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