usr_bin/iso-term: Fix a couple of shellcheck warnings
authorDarshaka Pathirana <dpat@syn-net.org>
Sun, 31 Jan 2021 09:03:59 +0000 (10:03 +0100)
committerDarshaka Pathirana <dpat@syn-net.org>
Fri, 3 Dec 2021 11:54:54 +0000 (12:54 +0100)
- 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

index 0362eb2..440233b 100755 (executable)
@@ -15,12 +15,10 @@ esac
 }
 
 if isutfenv ; then
 }
 
 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
    done
-   ZSH_NO_DEFAULT_LOCALE=1 x-terminal-emulator $*
-else
-   ZSH_NO_DEFAULT_LOCALE=1 x-terminal-emulator $*
 fi
 fi
+ZSH_NO_DEFAULT_LOCALE=1 x-terminal-emulator "$@"
 
 ## END OF FILE #################################################################
 
 ## END OF FILE #################################################################