diff options
author | Amin Bandali <amin@aminb.org> | 2018-05-14 21:34:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 21:34:02 -0400 |
commit | 4ed851e051dffa7ad7bf893281d2c9da76112c30 (patch) | |
tree | 1c9a5ce3fbdfed16de3dd28503379fa60bd720e2 | |
parent | d9edef4fee53dd38c51b76f9d3f288ac89d83c8b (diff) | |
download | rofi-pass-4ed851e051dffa7ad7bf893281d2c9da76112c30.tar.gz |
replace remaining uses of echo(1) with printf(1)
See https://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo/65819#65819
-rwxr-xr-x | rofi-pass | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -110,7 +110,7 @@ generateQrCode() { has_qrencode if [[ $? -eq "1" ]]; then - echo "qrencode not found" | _rofi -dmenu + printf '%s\n' "qrencode not found" | _rofi -dmenu exit_code=$? if [[ $exit_code -eq "1" ]]; then exit @@ -122,7 +122,7 @@ generateQrCode() { checkIfPass pass "$selected_password" | head -n 1 | qrencode -d 300 -v 8 -l H -o - | _image_viewer if [[ $? -eq "1" ]]; then - echo "" | _rofi -dmenu -mesg "Image viewer not defined or cannot read from pipe" + printf '%s\n' "" | _rofi -dmenu -mesg "Image viewer not defined or cannot read from pipe" exit_value=$? if [[ $exit_value -eq "1" ]]; then exit @@ -490,7 +490,7 @@ typeMenu () { checkIfPass local -a keys=("${!stuff[@]}") keys=("${keys[@]/$AUTOTYPE_field}") - typefield=$({ echo -n ${AUTOTYPE_field} ; printf '%s\n' "${keys[@]}" | sort; } | _rofi -dmenu -p "Choose Field to type > ") + typefield=$({ printf '%s' "${AUTOTYPE_field}" ; printf '%s\n' "${keys[@]}" | sort; } | _rofi -dmenu -p "Choose Field to type > ") typefield_exit=$? if [[ $typefield_exit -eq 1 ]]; then exit |