Skip to content

Commit 29acf3e

Browse files
committed
fix(completions/*): quote other $split in misc contexts
1 parent 83e16a2 commit 29acf3e

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

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/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/tar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ _gtar()
603603
# if there is some unknown option with '=', for example
604604
# (literally) user does --nonexistent=<TAB>, we do not want
605605
# continue also
606-
$split && break
606+
"$split" && break
607607

608608
# Most probably, when code goes here, the PREV variable contains
609609
# some string from "$long_arg_none" and we want continue.

0 commit comments

Comments
 (0)