diff options
Diffstat (limited to 'completions/mktemp')
-rw-r--r-- | completions/mktemp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/completions/mktemp b/completions/mktemp index 96c7a118..e063810d 100644 --- a/completions/mktemp +++ b/completions/mktemp @@ -6,10 +6,10 @@ _mktemp() _init_completion -s || return case "$prev" in - --help|--version|--suffix) + --help | --version | --suffix) return ;; - --tmpdir|-!(-*)p) + --tmpdir | -!(-*)p) _filedir -d return ;; @@ -17,13 +17,13 @@ _mktemp() $split && return - if [[ "$cur" == -* ]]; then + if [[ $cur == -* ]]; then local opts=$(_parse_help "$1") [[ $opts ]] || opts="-d -u -q -p -t" # non-GNU fallback - COMPREPLY=( $(compgen -W "$opts" -- "$cur") ) - [[ $COMPREPLY == *= ]] && compopt -o nospace + COMPREPLY=($(compgen -W "$opts" -- "$cur")) + [[ ${COMPREPLY-} == *= ]] && compopt -o nospace fi } && -complete -F _mktemp mktemp + complete -F _mktemp mktemp # ex: filetype=sh |