From: Darshaka Pathirana Date: Sun, 31 Jan 2021 09:03:59 +0000 (+0100) Subject: usr_bin/iso-term: Fix a couple of shellcheck warnings X-Git-Tag: v2.11.0~1^2~20 X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=commitdiff_plain;h=6f0b926f0885ead82fa4e43856f85825c245241e 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. --- 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 #################################################################