diff options
author | Christian Kohlstedde <christian@kohlsted.de> | 2020-07-22 22:43:56 +0200 |
---|---|---|
committer | Christian Kohlstedde <christian@kohlsted.de> | 2020-07-22 22:57:50 +0200 |
commit | 527bb3b3ac2186c4a1181c41d53fd7bef7693d66 (patch) | |
tree | 9884d77b196114d8d62843f147c212a6cd1b4fe6 | |
parent | 546200bf0b250af92e893533e495254b17f40c57 (diff) | |
download | rofi-pass-527bb3b3ac2186c4a1181c41d53fd7bef7693d66.tar.gz |
Fix shellcheck warnings
-rwxr-xr-x | rofi-pass | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -436,7 +436,7 @@ mainMenu () { if [[ -z "${stuff["${USERNAME_field}"]}" ]]; then if [[ -n $default_user ]]; then if [[ "$default_user" == ":filename" ]]; then - stuff["${USERNAME_field}"]="$(basename $selected_password)" + stuff["${USERNAME_field}"]="$(basename "$selected_password")" else stuff["${USERNAME_field}"]="${default_user}" fi @@ -796,8 +796,8 @@ get_config_file () { # return the first config file with a valid path for config in "${configs[@]}"; do - # '! -z' is needed in case ROFI_PASS_CONFIG is not set - if [[ ! -z "${config}" && -f "${config}" ]]; then + # '-n' is needed in case ROFI_PASS_CONFIG is not set + if [[ -n "${config}" && -f "${config}" ]]; then printf "%s" "$config" return fi @@ -807,7 +807,7 @@ get_config_file () { main () { # load config file config_file="$(get_config_file)" - [[ ! -z "$config_file" ]] && source "$config_file" + [[ -n "$config_file" ]] && source "$config_file" # create tmp dir if [[ ! -d "$cache_dir/rofi-pass" ]]; then |