diff options
author | Rasmus Steinke <rasi@xssn.at> | 2018-03-24 22:07:48 +0100 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2018-03-24 22:07:48 +0100 |
commit | 475478191a0e52d733e5f331cbcb9ae8f73400ec (patch) | |
tree | 8d60ac0fc41a4978b04a6e57c27cb7556c9b4def | |
parent | 356ae5f5e6a72fde29375219a57b06b2072b4776 (diff) | |
download | rofi-pass-475478191a0e52d733e5f331cbcb9ae8f73400ec.tar.gz |
make rofi-pass mostly pass shellcheck
-rwxr-xr-x | rofi-pass | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -10,7 +10,7 @@ _rofi () { } _image_viewer () { - feh - + feh - } # We expect to find these fields in pass(1)'s output @@ -30,6 +30,7 @@ clip=primary default_user="${ROFI_PASS_DEFAULT_USER-$(whoami)}" default_user2=john_doe password_length=12 +fix_layout=false # default shortcuts autotype="Alt+1" @@ -239,7 +240,7 @@ copyPass () { printf '%s' "$password" | doClip if [[ $notify == "true" ]] then - notify-send "rofi-pass" "Copied Password\nClearing in 45 seconds" + notify-send "rofi-pass" "Copied Password\\nClearing in 45 seconds" fi if [[ $notify == "true" ]] @@ -488,8 +489,8 @@ typeMenu () { if [[ -n $default_do ]]; then if [[ $default_do == "menu" ]]; then checkIfPass - local -a keys=(${!stuff[@]}) - keys=(${keys[@]/$AUTOTYPE_field}) + local -a keys=("${!stuff[@]}") + keys=("${keys[@]/$AUTOTYPE_field}") typefield=$({ echo ${AUTOTYPE_field} ; printf '%s\n' "${keys[@]}" | sort; } | _rofi -dmenu -p "Choose Field to type > ") typefield_exit=$? if [[ $typefield_exit -eq 1 ]]; then @@ -556,9 +557,9 @@ actionMenu () { showEntry () { if [[ -z $pass_content ]]; then - password_temp=$(PASSWORD_STORE_DIR="${root}" pass show "$selected_password") - password="${password_temp%%$'\n'*}" - pass_key_value=$(printf '%s\n' "${password_temp}" | tail -n+2 | grep ': ') + pass_temp=$(PASSWORD_STORE_DIR="${root}" pass show "$selected_password") + password="${pass_temp%%$'\n'*}" + pass_key_value=$(printf '%s\n' "${pass_temp}" | tail -n+2 | grep ': ') declare -A stuff while read -r LINE; do _id="${LINE%%: *}" @@ -595,7 +596,7 @@ showEntry () { fi if [[ $notify == "true" ]] then - notify-send "rofi-pass" "Copied Password\nClearing in 45 seconds" + notify-send "rofi-pass" "Copied Password\\nClearing in 45 seconds" fi if [[ $notify == "true" ]] then |