From 11836c0c18b07f4bd1ea22a2163875975f3e6816 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Wed, 1 Apr 2020 09:29:52 +0100 Subject: fix $@ parameter expansion issues $@ when unquoted is subject to further word splitting. this fixes a bunch of instances where it was incorrectly being used unquoted. Gbp-Dch: Short --- functions/aliases.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'functions/aliases.sh') diff --git a/functions/aliases.sh b/functions/aliases.sh index bf77e4284..e899b1e60 100755 --- a/functions/aliases.sh +++ b/functions/aliases.sh @@ -20,10 +20,8 @@ In_list () shift local ITEM - for ITEM in ${@} - do - if [ "${NEEDLE}" = "${ITEM}" ] - then + for ITEM in "${@}"; do + if [ "${NEEDLE}" = "${ITEM}" ]; then return 0 fi done @@ -34,8 +32,7 @@ In_list () Truncate () { local FILE - for FILE in ${@} - do + for FILE in "${@}"; do if [ ! -L ${FILE} ] then : > ${FILE} -- cgit v1.2.3