Skip to content

Commit 19fb781

Browse files
committed
fix: quote other boolean variables for custom IFS
1 parent 5982256 commit 19fb781

File tree

17 files changed

+21
-21
lines changed

17 files changed

+21
-21
lines changed

bash_completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ _comp_delimited()
799799
fi
800800
[[ $cur == *$delimiter* ]] && prefix=${cur%"$delimiter"*}$delimiter
801801

802-
if $deduplicate; then
802+
if "$deduplicate"; then
803803
# We could construct a -X pattern to feed to compgen, but that'd
804804
# conflict with possibly already set -X in $@, as well as have
805805
# glob char escaping issues to deal with. Do removals by hand instead.

completions/_mount.linux

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _comp_cmd_mount()
2424
proc qnx4 ramfs reiserfs romfs squashfs smbfs sysv tmpfs ubifs
2525
udf ufs umsdos usbfs vfat xfs' -- "$cur"))
2626
_fstypes
27-
$split && COMPREPLY=(${COMPREPLY[@]/#/$prev,})
27+
"$split" && COMPREPLY=(${COMPREPLY[@]/#/$prev,})
2828
return
2929
;;
3030
--bind | -B | --rbind | -R)
@@ -206,7 +206,7 @@ _comp_cmd_mount()
206206
esac
207207
# COMP_WORDBREAKS is a real pain in the ass
208208
prev="${prev##*["$COMP_WORDBREAKS"]}"
209-
$split && COMPREPLY=(${COMPREPLY[@]/#/"$prev,"})
209+
"$split" && COMPREPLY=(${COMPREPLY[@]/#/"$prev,"})
210210
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
211211
return
212212
;;

completions/_umount.linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ _comp_cmd_umount()
113113
ramfs reiserfs romfs squashfs smbfs sysv tmpfs ubifs udf ufs
114114
umsdos usbfs vfat xfs' -- "$cur"))
115115
_fstypes
116-
$split && COMPREPLY=(${COMPREPLY[@]/#/$prev,})
116+
"$split" && COMPREPLY=(${COMPREPLY[@]/#/$prev,})
117117
return
118118
;;
119119
-O)

completions/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ _configure()
2020
;;
2121
esac
2222

23-
if $split || [[ $cur != -* ]]; then
23+
if "$split" || [[ $cur != -* ]]; then
2424
_filedir
2525
return
2626
fi

completions/cppcheck

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ _cppcheck()
2626
COMPREPLY=($(compgen -W 'all warning style performance
2727
portability information unusedFunction missingInclude' \
2828
-- "$cur"))
29-
$split && COMPREPLY=(${COMPREPLY[@]/#/"$prev,"})
29+
"$split" && COMPREPLY=(${COMPREPLY[@]/#/"$prev,"})
3030
return
3131
;;
3232
--error-exitcode)
@@ -62,7 +62,7 @@ _cppcheck()
6262
return
6363
;;
6464
-rp | --relative-paths)
65-
if $split; then # -rp without argument is allowed
65+
if "$split"; then # -rp without argument is allowed
6666
_filedir -d
6767
return
6868
fi

completions/export

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ _comp_cmd_export()
5252
return
5353
fi
5454
local suffix=""
55-
if ! $remove && [[ $action != function ]]; then
55+
if ! "$remove" && [[ $action != function ]]; then
5656
suffix="="
5757
compopt -o nospace
5858
fi

completions/find

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ _comp_cmd_find()
7171
done
7272

7373
# handle case where first parameter is not a dash option
74-
if ! $exprfound && [[ $cur != [-\(\),\!]* ]]; then
74+
if ! "$exprfound" && [[ $cur != [-\(\),\!]* ]]; then
7575
_filedir -d
7676
return
7777
fi

completions/fio

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ _comp_cmd_fio()
118118
local line="" in_values=false
119119
ret=()
120120
for line in "${cmdhelp[@]}"; do
121-
if $in_values; then
121+
if "$in_values"; then
122122
if [[ $line =~ ^[[:space:]]*:[[:space:]]*([^[:space:]]+) ]]; then
123123
ret+=("${BASH_REMATCH[1]}")
124124
else

completions/idn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _idn()
1818
;;
1919
esac
2020

21-
if ! $split && [[ $cur == -* ]]; then
21+
if ! "$split" && [[ $cur == -* ]]; then
2222
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
2323
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
2424
fi

completions/jarsigner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ _jarsigner()
4040
fi
4141
done
4242

43-
if ! $jar; then
43+
if ! "$jar"; then
4444
if [[ $cur == -* ]]; then
4545
# Documented as "should not be used": -internalsf, -sectionsonly
4646
COMPREPLY=($(compgen -W '-keystore -storepass -storetype

0 commit comments

Comments
 (0)