Skip to content

Commit

Permalink
_xinetd_services: avoid nounset error on bash 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jul 25, 2020
1 parent c2f0056 commit 0df93b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,8 @@ _xinetd_services()
shopt -s nullglob
local -a svcs=($(printf '%s\n' $xinetddir/!($_backup_glob)))
$reset
COMPREPLY+=($(compgen -W '${svcs[@]#$xinetddir/}' -- "${cur-}"))
((!${#svcs[@]})) ||
COMPREPLY+=($(compgen -W '${svcs[@]#$xinetddir/}' -- "${cur-}"))
fi
}

Expand Down

0 comments on commit 0df93b0

Please sign in to comment.