From dc1d4f0e46c4691d4eaf8f8fd5cf3b02c92d6f0b Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 9 Aug 2023 21:33:40 +0200 Subject: Make shellcheck happy. --- rofi-pass | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/rofi-pass b/rofi-pass index 88d9a3f..9a70589 100755 --- a/rofi-pass +++ b/rofi-pass @@ -247,8 +247,9 @@ generateQrCode() { openURL () { checkIfPass - $BROWSER "$(PASSWORD_STORE_DIR="${root}" pass "$selected_password" | grep "${URL_field}: " | gawk '{sub(/:/,"")}{print $2}1' | head -1)"; exit; + $BROWSER "$(PASSWORD_STORE_DIR="${root}" pass "$selected_password" | grep "${URL_field}: " | gawk '{sub(/:/,"")}{print $2}1' | head -1)" clearUp + exit } typeUser () { @@ -567,7 +568,6 @@ clearUp () { unset password unset selected_password unset password_temp - unset stuff } helpMenu () { @@ -727,12 +727,8 @@ showEntry () { exit fi fi - exit - unset stuff - unset password - unset selected_password - unset password_temp - unset stuff + + clearUp exit } @@ -779,6 +775,7 @@ manageEntry () { } edit_pass() { + # shellcheck disable=SC2154 if [[ $edit_new_pass == "true" ]]; then PASSWORD_STORE_DIR="${root}" pass edit "${1}" fi @@ -905,6 +902,7 @@ get_config_file () { main () { # load config file config_file="$(get_config_file)" + # shellcheck source=/dev/null [[ -n "$config_file" ]] && source "$config_file" # create tmp dir -- cgit