Skip to content

Commit 0df93b0

Browse files
committed
_xinetd_services: avoid nounset error on bash 4.2
1 parent c2f0056 commit 0df93b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bash_completion

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,8 @@ _xinetd_services()
12081208
shopt -s nullglob
12091209
local -a svcs=($(printf '%s\n' $xinetddir/!($_backup_glob)))
12101210
$reset
1211-
COMPREPLY+=($(compgen -W '${svcs[@]#$xinetddir/}' -- "${cur-}"))
1211+
((!${#svcs[@]})) ||
1212+
COMPREPLY+=($(compgen -W '${svcs[@]#$xinetddir/}' -- "${cur-}"))
12121213
fi
12131214
}
12141215

0 commit comments

Comments
 (0)