remove leading whitespace

This commit is contained in:
Rasmus Steinke 2016-08-05 21:00:45 +02:00
parent 84d355981b
commit 41b62d21b2

View File

@ -256,7 +256,7 @@ Run ${default_do} with <span color='$help_color'>Enter</span>. For more help hit
# generate Array of fields # generate Array of fields
password_temp=$(PASSWORD_STORE_DIR="${root}" pass "$selected_password") password_temp=$(PASSWORD_STORE_DIR="${root}" pass "$selected_password")
password="${password_temp%%$'\n'*}" password="${password_temp%%$'\n'*}"
pass_key_value=$(echo "${password_temp}" | awk '$2{ print }') pass_key_value=$(echo "${password_temp}" | awk '$1 ~ /:$/{$1=$1;print}')
declare -A stuff declare -A stuff
while read -r LINE; do while read -r LINE; do
_id="${LINE%%: *}" _id="${LINE%%: *}"
@ -274,7 +274,7 @@ Run ${default_do} with <span color='$help_color'>Enter</span>. For more help hit
pass_content="$(for key in "${!stuff[@]}"; do echo "${key}: ${stuff[$key]}"; done)" pass_content="$(for key in "${!stuff[@]}"; do echo "${key}: ${stuff[$key]}"; done)"
# actions based on keypresses # actions based on keypresses
if [[ "${rofi_exit}" -eq 0 ]]; then typeMenu; if [[ "${rofi_exit}" -eq 0 ]]; then export default_do="$default_do"; typeMenu;
elif [[ "${rofi_exit}" -eq 13 ]]; then openURL; elif [[ "${rofi_exit}" -eq 13 ]]; then openURL;
elif [[ "${rofi_exit}" -eq 10 ]]; then sleep 0.2; autopass; elif [[ "${rofi_exit}" -eq 10 ]]; then sleep 0.2; autopass;
elif [[ "${rofi_exit}" -eq 14 ]]; then copyMenu; elif [[ "${rofi_exit}" -eq 14 ]]; then copyMenu;
@ -282,7 +282,7 @@ Run ${default_do} with <span color='$help_color'>Enter</span>. For more help hit
elif [[ "${rofi_exit}" -eq 12 ]]; then sleep 0.2; typePass; elif [[ "${rofi_exit}" -eq 12 ]]; then sleep 0.2; typePass;
elif [[ "${rofi_exit}" -eq 17 ]]; then copyURL; elif [[ "${rofi_exit}" -eq 17 ]]; then copyURL;
elif [[ "${rofi_exit}" -eq 16 ]]; then viewEntry; elif [[ "${rofi_exit}" -eq 16 ]]; then viewEntry;
elif [[ "${rofi_exit}" -eq 18 ]]; then force_type=1 typeMenu; elif [[ "${rofi_exit}" -eq 18 ]]; then export default_do="menu"; typeMenu;
elif [[ "${rofi_exit}" -eq 15 ]]; then copyPass; elif [[ "${rofi_exit}" -eq 15 ]]; then copyPass;
elif [[ "${rofi_exit}" -eq 23 ]]; then actionMenu; elif [[ "${rofi_exit}" -eq 23 ]]; then actionMenu;
elif [[ "${rofi_exit}" -eq 25 ]]; then unset selected_password; helpMenu; elif [[ "${rofi_exit}" -eq 25 ]]; then unset selected_password; helpMenu;
@ -324,10 +324,10 @@ if [[ $help_val -eq 1 ]]; then exit;
else unset helptext; mainMenu; fi else unset helptext; mainMenu; fi
} }
typeMenu () { typeMenu () {
if [[ -n $force_type ]]; then clear
default_do="menu" echo "${default_do}"
fi
if [[ -n $default_do ]]; then if [[ -n $default_do ]]; then
if [[ $default_do == "menu" ]]; then if [[ $default_do == "menu" ]]; then
checkIfPass checkIfPass
@ -346,8 +346,6 @@ typeMenu () {
typeField typeField
fi fi
clearUp clearUp
elif [[ $default_do == "autotype" ]]; then
autopass
else else
$(${default_do}) $(${default_do})
fi fi