remove having to press enter in menus and OTP input
This commit is contained in:
		
							
								
								
									
										10
									
								
								bml-cli
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								bml-cli
									
									
									
									
									
								
							@@ -527,7 +527,7 @@ echo "5 - Services"
 | 
			
		||||
echo "6 - Settings"
 | 
			
		||||
echo ""
 | 
			
		||||
printf 'Please Input: '
 | 
			
		||||
read -r MENU
 | 
			
		||||
read -n 1 -r MENU
 | 
			
		||||
 | 
			
		||||
	if [ "$MENU" = "1" ]
 | 
			
		||||
        then
 | 
			
		||||
@@ -585,7 +585,7 @@ contacts_menu(){
 | 
			
		||||
	echo "x - Go back"
 | 
			
		||||
	echo ""
 | 
			
		||||
	printf 'Please Input: '
 | 
			
		||||
read -r CONTACTS
 | 
			
		||||
read -n 1 -r CONTACTS
 | 
			
		||||
 | 
			
		||||
if [ "$CONTACTS" = "1" ] || ["$CONTACTS" = "transfer" ]
 | 
			
		||||
then
 | 
			
		||||
@@ -629,7 +629,7 @@ change_password(){
 | 
			
		||||
	echo "1 - Mobile"
 | 
			
		||||
	echo "2 - Email"
 | 
			
		||||
	echo ""
 | 
			
		||||
	read -p "Please input: " OTPCHANNEL
 | 
			
		||||
	read -n 1 -p "Please input: " OTPCHANNEL
 | 
			
		||||
 | 
			
		||||
	if [ "$OTPCHANNEL" = "1" ] || [ "$OTPCHANNEL" = "mobile" ]
 | 
			
		||||
	then
 | 
			
		||||
@@ -678,7 +678,7 @@ change_password(){
 | 
			
		||||
		--data-raw channel=$OTPCHANNEL > /dev/null
 | 
			
		||||
 | 
			
		||||
	echo ${lightgreen}OTP sent to ${yellow}${ECHOOTPCHANNEL}${reset}
 | 
			
		||||
	read -p 'Enter OTP: ' OTP
 | 
			
		||||
	read -n 6 -p 'Enter OTP: ' OTP
 | 
			
		||||
	CHANGEPASSWORD=$(curl -s -b $COOKIE $BML_URL/user/changepassword \
 | 
			
		||||
		--data-raw currentPassword=$OLD_PASSWORD \
 | 
			
		||||
		--data-raw newPassword=$NEW_PASSWORD \
 | 
			
		||||
@@ -726,7 +726,7 @@ settings(){
 | 
			
		||||
	echo "3 - Change Password"
 | 
			
		||||
	echo ""
 | 
			
		||||
	printf 'Please Input: '
 | 
			
		||||
	read -r SETTINGS
 | 
			
		||||
	read -n 1 -r SETTINGS
 | 
			
		||||
 | 
			
		||||
	if [ "$SETTINGS" = "1" ]
 | 
			
		||||
	then
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user