File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ _comp_cmd_mock()
27
27
return
28
28
;;
29
29
-r | --root)
30
- _comp_compgen_split -- " $( command ls " $cfgdir " ) "
31
- COMPREPLY=(${COMPREPLY[@]/% .cfg/ } )
30
+ _comp_compgen_split -- " $( command ls " $cfgdir " ) " &&
31
+ COMPREPLY=(${COMPREPLY[@]/% .cfg/ } )
32
32
return
33
33
;;
34
34
--configdir | --resultdir)
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ _comp_cmd_mount()
24
24
qnx4 ramfs reiserfs romfs squashfs smbfs sysv tmpfs ubifs udf
25
25
ufs umsdos usbfs vfat xfs'
26
26
_comp_compgen -a fstypes
27
- [[ $split ]] && COMPREPLY=(${COMPREPLY[@]/#/ $prev ,} )
27
+ [[ $split ]] && (( ${# COMPREPLY[@]} )) &&
28
+ COMPREPLY=(${COMPREPLY[@]/#/ $prev ,} )
28
29
return
29
30
;;
30
31
--bind | -B | --rbind | -R)
@@ -202,7 +203,8 @@ _comp_cmd_mount()
202
203
esac
203
204
# COMP_WORDBREAKS is a real pain in the ass
204
205
prev=" ${prev##* ["$COMP_WORDBREAKS"]} "
205
- [[ $split ]] && COMPREPLY=(${COMPREPLY[@]/#/ " $prev ," } )
206
+ [[ $split ]] && ((${COMPREPLY[@]} )) &&
207
+ COMPREPLY=(${COMPREPLY[@]/#/ " $prev ," } )
206
208
[[ ${COMPREPLY-} == * = ]] && compopt -o nospace
207
209
return
208
210
;;
Original file line number Diff line number Diff line change @@ -110,7 +110,8 @@ _comp_cmd_umount()
110
110
reiserfs romfs squashfs smbfs sysv tmpfs ubifs udf ufs umsdos
111
111
usbfs vfat xfs'
112
112
_comp_compgen -a fstypes
113
- [[ $split ]] && COMPREPLY=(${COMPREPLY[@]/#/ $prev ,} )
113
+ [[ $split ]] && (( ${# COMPREPLY[@]} )) &&
114
+ COMPREPLY=(${COMPREPLY[@]/#/ $prev ,} )
114
115
return
115
116
;;
116
117
-O)
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ _comp_cmd_kldunload()
7
7
local cur prev words cword comp_args
8
8
_comp_initialize -- " $@ " || return
9
9
10
- _comp_compgen_split -X ' !*.ko' -- " $( kldstat) "
11
- COMPREPLY=(${COMPREPLY[@]% .ko} )
10
+ _comp_compgen_split -X ' !*.ko' -- " $( kldstat) " &&
11
+ COMPREPLY=(${COMPREPLY[@]% .ko} )
12
12
} &&
13
13
complete -F _comp_cmd_kldunload kldunload
14
14
You can’t perform that action at this time.
0 commit comments