From 6f0b926f0885ead82fa4e43856f85825c245241e Mon Sep 17 00:00:00 2001 From: Darshaka Pathirana Date: Sun, 31 Jan 2021 10:03:59 +0100 Subject: [PATCH] usr_bin/iso-term: Fix a couple of shellcheck warnings - SC2006: Use $(..) instead of legacy `..`. - SC2086: Double quote to prevent globbing and word splitting. - SC2048: Use "$@" (with quotes) to prevent whitespace problems. - SC2086: Double quote to prevent globbing and word splitting. While at it also put the execution of x-terminal-emulator out of the if-then-else clause to avoid duplicate code. --- usr_bin/iso-term | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/usr_bin/iso-term b/usr_bin/iso-term index 0362eb2..440233b 100755 --- a/usr_bin/iso-term +++ b/usr_bin/iso-term @@ -15,12 +15,10 @@ esac } if isutfenv ; then - for ENV in `env | grep UTF` ; do - eval export "$(echo $ENV | sed 's/UTF-8/iso885915/')" + for ENV in $(env | grep UTF) ; do + eval export "$(echo "$ENV" | sed 's/UTF-8/iso885915/')" done - ZSH_NO_DEFAULT_LOCALE=1 x-terminal-emulator $* -else - ZSH_NO_DEFAULT_LOCALE=1 x-terminal-emulator $* fi +ZSH_NO_DEFAULT_LOCALE=1 x-terminal-emulator "$@" ## END OF FILE ################################################################# -- 2.1.4