summaryrefslogtreecommitdiff
path: root/completions/patch
diff options
context:
space:
mode:
Diffstat (limited to 'completions/patch')
-rw-r--r--completions/patch34
1 files changed, 17 insertions, 17 deletions
diff --git a/completions/patch b/completions/patch
index df85211d..e883d9ca 100644
--- a/completions/patch
+++ b/completions/patch
@@ -6,42 +6,42 @@ _patch()
_init_completion -s || return
case $prev in
- --strip|--ifdef|--prefix|--basename-prefix|--suffix|--get|\
- -!(-*)[pDBYzg])
+ --strip | --ifdef | --prefix | --basename-prefix | --suffix | --get | \
+ -!(-*)[pDBYzg])
return
;;
- --fuzz|-!(-*)F)
- COMPREPLY=( $(compgen -W '{0..3}' -- "$cur") )
+ --fuzz | -!(-*)F)
+ COMPREPLY=($(compgen -W '{0..3}' -- "$cur"))
return
;;
- --input|-!(-*)i)
+ --input | -!(-*)i)
_filedir '@(?(d)patch|dif?(f))'
return
;;
- --output|--reject-file|-!(-*)[or])
- [[ ! $cur || $cur == - ]] && COMPREPLY=( - )
+ --output | --reject-file | -!(-*)[or])
+ [[ ! $cur || $cur == - ]] && COMPREPLY=(-)
_filedir
return
;;
--quoting-style)
- COMPREPLY=( $(compgen -W 'literal shell shell-always c escape' \
- -- "$cur") )
+ COMPREPLY=($(compgen -W 'literal shell shell-always c escape' \
+ -- "$cur"))
return
;;
- --version-control|-!(-*)V)
- COMPREPLY=( $(compgen -W 'simple numbered existing' -- "$cur") )
+ --version-control | -!(-*)V)
+ COMPREPLY=($(compgen -W 'simple numbered existing' -- "$cur"))
return
;;
- --directory|-!(-*)d)
+ --directory | -!(-*)d)
_filedir -d
return
;;
--reject-format)
- COMPREPLY=( $(compgen -W 'context unified' -- "$cur") )
+ COMPREPLY=($(compgen -W 'context unified' -- "$cur"))
return
;;
--read-only)
- COMPREPLY=( $(compgen -W 'ignore warn fail' -- "$cur") )
+ COMPREPLY=($(compgen -W 'ignore warn fail' -- "$cur"))
return
;;
esac
@@ -49,8 +49,8 @@ _patch()
$split && return
if [[ $cur == -* ]]; then
- COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
- [[ $COMPREPLY == *= ]] && compopt -o nospace
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
return
fi
@@ -65,6 +65,6 @@ _patch()
;;
esac
} &&
-complete -F _patch patch
+ complete -F _patch patch
# ex: filetype=sh