summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/.distfiles4
-rw-r--r--Completion/Unix/Command/_awk6
-rw-r--r--Completion/Unix/Command/_cat43
-rw-r--r--Completion/Unix/Command/_cp92
-rw-r--r--Completion/Unix/Command/_cut74
-rw-r--r--Completion/Unix/Command/_devtodo6
-rw-r--r--Completion/Unix/Command/_django2
-rw-r--r--Completion/Unix/Command/_du18
-rw-r--r--Completion/Unix/Command/_etags63
-rw-r--r--Completion/Unix/Command/_git700
-rw-r--r--Completion/Unix/Command/_gradle16
-rw-r--r--Completion/Unix/Command/_graphicsmagick2
-rw-r--r--Completion/Unix/Command/_gzip6
-rw-r--r--Completion/Unix/Command/_imagemagick2
-rw-r--r--Completion/Unix/Command/_java24
-rw-r--r--Completion/Unix/Command/_make86
-rw-r--r--Completion/Unix/Command/_osc149
-rw-r--r--Completion/Unix/Command/_perforce10
-rw-r--r--Completion/Unix/Command/_prove51
-rw-r--r--Completion/Unix/Command/_psutils34
-rw-r--r--Completion/Unix/Command/_qemu6
-rw-r--r--Completion/Unix/Command/_rsync13
-rw-r--r--Completion/Unix/Command/_sed2
-rw-r--r--Completion/Unix/Command/_sh11
-rw-r--r--Completion/Unix/Command/_sort62
-rw-r--r--Completion/Unix/Command/_ssh2
-rw-r--r--Completion/Unix/Command/_subversion14
-rw-r--r--Completion/Unix/Command/_systemd12
-rw-r--r--Completion/Unix/Command/_twisted109
-rw-r--r--Completion/Unix/Command/_vcsh149
-rw-r--r--Completion/Unix/Command/_wget20
-rw-r--r--Completion/Unix/Command/_xmlsoft16
32 files changed, 1205 insertions, 599 deletions
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index 36d922f9a..178406ffd 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -20,6 +20,7 @@ _bzip2
_bzr
_cal
_calendar
+_cat
_ccal
_cdcd
_cdrdao
@@ -57,6 +58,7 @@ _elm
_enscript
_env
_espeak
+_etags
_fakeroot
_feh
_fetchmail
@@ -152,7 +154,6 @@ _nmap
_notmuch
_npm
_nslookup
-_osc
_pack
_patch
_pax
@@ -173,6 +174,7 @@ _pon
_postfix
_prcs
_printenv
+_prove
_psutils
_pump
_pydoc
diff --git a/Completion/Unix/Command/_awk b/Completion/Unix/Command/_awk
index da748e9be..c493c3b04 100644
--- a/Completion/Unix/Command/_awk
+++ b/Completion/Unix/Command/_awk
@@ -14,8 +14,8 @@
# Fixing this is beyond my current _arguments expertise--help
# appreciated.
-_arguments -S -s '-F[define input field separator to be an extended regular expression]:extended regular expression:' \
- '*-v[assign values to variables]:assignment:' \
- '(1)-f[program file]:program file:_files' \
+_arguments -S -s '-F+[define input field separator to be an extended regular expression]:extended regular expression:' \
+ '*-v+[assign values to variables]:assignment:' \
+ '(1)-f+[program file]:program file:_files' \
'1:program text:' \
'*:input files:_files'
diff --git a/Completion/Unix/Command/_cat b/Completion/Unix/Command/_cat
new file mode 100644
index 000000000..e223d90d9
--- /dev/null
+++ b/Completion/Unix/Command/_cat
@@ -0,0 +1,43 @@
+#compdef cat
+
+local -a args
+
+if _pick_variant gnu=GNU unix --version; then
+ args=(
+ '(-A --show-all)'{-A,--show-all}'[equivalent to -vET]'
+ '(-b --number-nonblank -n --number)'{-b,--number-nonblank}'[number nonempty output lines, overrides -n]'
+ '-e[equivalent to -vE]'
+ '(-E --show-ends)'{-E,--show-ends}'[display $ at end of each line]'
+ '(-n --number)'{-n,--number}'[number all output lines]'
+ '(-s --squeeze-blank)'{-s,--squeeze-blank}'[suppress repeated empty output lines]'
+ '-t[equivalent to -vT]'
+ '(-T --show-tabs)'{-T,--show-tabs}'[display TAB characters as ^I]'
+ '-u[ignored]'
+ '(-v --show-nonprinting)'{-v,--show-nonprinting}'[use ^ and M- notation, except for LFD and TAB]'
+ '(- : *)--help[display help and exit]'
+ '(- : *)--version[output version information and exit]'
+ '*:files:_files'
+ )
+
+elif [[ "$OSTYPE" == (freebsd|dragonfly|darwin)* ]]; then
+ args=(
+ '(-n)-b[number non-blank output lines]'
+ '(-v)-e[display $ at the end of each line (implies -v)]'
+ '-n[number all output lines]'
+ '-s[squeeze multiple blank lines into one]'
+ '(-v)-t[display tab as ^I (implies -v)]'
+ '-u[do not buffer output]'
+ '-v[display non-printing chars as ^X or M-a]'
+ '(-)*:files:_files'
+ )
+
+else
+ # POSIX reqires '-u', and most OSes may support '-n'
+ args=(
+ '-n[number all output lines]'
+ '-u[do not buffer output]'
+ '*:files:_files'
+ )
+fi
+
+_arguments -s -S : $args
diff --git a/Completion/Unix/Command/_cp b/Completion/Unix/Command/_cp
index 958214a18..5013f852c 100644
--- a/Completion/Unix/Command/_cp
+++ b/Completion/Unix/Command/_cp
@@ -1,34 +1,62 @@
#compdef cp
-_arguments -s \
- '(-a --archive)'{-a,--archive}'[same as -dpR]' \
- '(-b --backup)-b[backup]' \
- '(-b --backup)--backup=[backup]:method:(none off numbered t existing nil simple never)' \
- '--copy-contents[copy contents of special files when recursive]' \
- '-d[same as --no-dereference --preserve=links]' \
- '(-f --force)'{-f,--force}'[remove and retry for destinations that cannot be opened]' \
- '(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \
- '-H[follow command-line symbolic links]' \
- '(-l --link)'{-l,--link}'[link files instead of copying]' \
- '(-L --dereference)'{-L,--dereference}'[always follow symbolic links]' \
- '(-n --no-clobber)'{-n,--no-clobber}'[do not overwrite an existing file]' \
- '(-P --no-dereference)'{-P,--no-dereference}'[never follow symbolic links]' \
- '-p[same as --preserve=mode,ownership,timestamps]' \
- '--preserve=[preserve specified attributes]:attributes to preserve:_values -s , mode timestamps ownership links context xattr all' \
- '--no-preserve=[don'\''t preserve specified attributes]:attributes not to preserve:_values -s , mode timestamps ownership links context xattr all' \
- '--parents[append source path to target directory]' \
- '(-R -r --recursive)'{-R,-r,--recursive}'[copy directories recursively]' \
- '--reflink=[control clone/CoW copies]:when to perform a lightweight copy:(always auto)' \
- '--remove-destination[remove each existing destination file before attempting to open it]' \
- '--sparse=[control creation of sparse files]:when to create sparse files:(auto always never)' \
- '--strip-trailing-slashes[remove any trailing slashes from each source argument]' \
- '(-s --symbolic-link)'{-s,--symbolic-link}'[make symbolic links instead of copies of non-directories]' \
- '(-S --suffix)'{-S,--suffix=}'[override the usual backup suffix]:backup suffix:' \
- '(-t --target-directory)'{-t,--target-directory=}'[copy all source arguments into target directory]:target directory:_files -/' \
- '(-T --no-target-directory)'{-T,--no-target-directory}'[treat DEST as a normal file]' \
- '(-u --update)'{-u,--update}'[copy only when source is newer than destination or destination is missing]' \
- '(-v --verbose)'{-v,--verbose}'[explain what is being done]' \
- '(-x --one-file-system)'{-x,--one-file-system}'[stay on this file system]' \
- '--help' \
- '--version' \
- '*:file or directory:_files'
+if _pick_variant gnu=GNU unix --version; then
+ _arguments -s -S \
+ '(-a --archive)'{-a,--archive}'[same as -dR --preserve=all]' \
+ '(-b --backup)-b[backup]' \
+ '(-b --backup)--backup=[backup]:method:(none off numbered t existing nil simple never)' \
+ '--copy-contents[copy contents of special files when recursive]' \
+ '-d[same as --no-dereference --preserve=links]' \
+ '(-f --force)'{-f,--force}'[remove and retry for destinations that cannot be opened]' \
+ '(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \
+ '-H[follow command-line symbolic links]' \
+ '(-l --link)'{-l,--link}'[link files instead of copying]' \
+ '(-L --dereference)'{-L,--dereference}'[always follow symbolic links]' \
+ '(-n --no-clobber)'{-n,--no-clobber}'[do not overwrite an existing file]' \
+ '(-P --no-dereference)'{-P,--no-dereference}'[never follow symbolic links]' \
+ '-p[same as --preserve=mode,ownership,timestamps]' \
+ '--preserve=[preserve specified attributes]:attributes to preserve:_values -s , mode timestamps ownership links context xattr all' \
+ '--no-preserve=[don'\''t preserve specified attributes]:attributes not to preserve:_values -s , mode timestamps ownership links context xattr all' \
+ '--parents[append source path to target directory]' \
+ '(-R -r --recursive)'{-R,-r,--recursive}'[copy directories recursively]' \
+ '--reflink=[control clone/CoW copies]:when to perform a lightweight copy:(always auto)' \
+ '--remove-destination[remove each existing destination file before attempting to open it]' \
+ '--sparse=[control creation of sparse files]:when to create sparse files:(auto always never)' \
+ '--strip-trailing-slashes[remove any trailing slashes from each source argument]' \
+ '(-s --symbolic-link)'{-s,--symbolic-link}'[make symbolic links instead of copies of non-directories]' \
+ '(-S --suffix)'{-S,--suffix=}'[override the usual backup suffix]:backup suffix:' \
+ '(-t --target-directory)'{-t,--target-directory=}'[copy all source arguments into target directory]:target directory:_files -/' \
+ '(-T --no-target-directory)'{-T,--no-target-directory}'[treat DEST as a normal file]' \
+ '(-u --update)'{-u,--update}'[copy only when source is newer than destination or destination is missing]' \
+ '(-v --verbose)'{-v,--verbose}'[explain what is being done]' \
+ '(-x --one-file-system)'{-x,--one-file-system}'[stay on this file system]' \
+ '--help' \
+ '--version' \
+ '*:file or directory:_files'
+
+elif [[ "$OSTYPE" == darwin* ]]; then
+ _arguments -s -S \
+ '-R[copy directories recursively]' \
+ '(-L -P)-H[with -R, follow symlinks on the command line]' \
+ '(-H -P)-L[with -R, follow all symlinks]' \
+ '(-H -L)-P[with -R, do not follow symlinks (default)]' \
+ '(-i -n)-f[force overwriting existing file]' \
+ '(-f -n)-i[confirm before overwriting existing file]' \
+ '(-f -i)-n[do not overwrite existing file]' \
+ '-a[same as -pRP]' \
+ '-p[preserve timestamps, mode, owner, flags, ACLs, and Extended Attributes]' \
+ '-v[show file names as they are copied]' \
+ '-X[do not copy Extended Attributes or resource forks]' \
+ '(-)*:file or directory:_files'
+
+else # assume POSIX
+ _arguments -s -S \
+ '-R[copy directories recursively]' \
+ '(-L -P)-H[with -R, follow symlinks on the command line]' \
+ '(-H -P)-L[with -R, follow all symlinks]' \
+ '(-H -L)-P[do not follow symlinks]' \
+ '(-i)-f[force overwriting existing file]' \
+ '(-f)-i[confirm before overwriting existing file]' \
+ '-p[preserve timestamps, mode, and owner]' \
+ '(-)*:file or directory:_files'
+fi
diff --git a/Completion/Unix/Command/_cut b/Completion/Unix/Command/_cut
index 81e8c257b..1024c20a7 100644
--- a/Completion/Unix/Command/_cut
+++ b/Completion/Unix/Command/_cut
@@ -5,54 +5,54 @@ typeset -A _cut_args
if _pick_variant gnu="Free Soft" unix --version; then
case $LANG in
(de_DE.UTF-8)
- _cut_args=(
- bytes "nur diese Bytes ausgeben"
- characters "nur diese Zeichen ausgeben"
- delimiter "Delimiter anstelle von Tabulator als Trenner benutzen"
- fields "nur diese Felder und alle Zeilen OHNE Trennzeichen ausgeben"
- n "(ignoriert)"
- complement "das Komplement der Menge der gew$'\u00e4'hlten Bytes, Zeichen oder Felder bilden"
- only-delimited "keine Zeilen ausgeben, die keinen Trenner enthalten"
- output-delimiter "Zeichenkette als Ausgabetrennzeichen benutzen"
- help "diese Hilfe anzeigen und beenden"
- version "Versionsinformation anzeigen und beenden"
- )
+ _cut_args=(
+ bytes "nur diese Bytes ausgeben"
+ characters "nur diese Zeichen ausgeben"
+ delimiter "Delimiter anstelle von Tabulator als Trenner benutzen"
+ fields "nur diese Felder und alle Zeilen OHNE Trennzeichen ausgeben"
+ n "(ignoriert)"
+ complement $'das Komplement der Menge der gew\u00e4hlten Bytes, Zeichen oder Felder bilden'
+ only-delimited "keine Zeilen ausgeben, die keinen Trenner enthalten"
+ output-delimiter "Zeichenkette als Ausgabetrennzeichen benutzen"
+ help "diese Hilfe anzeigen und beenden"
+ version "Versionsinformation anzeigen und beenden"
+ )
;;
(*)
- _cut_args=(
- bytes "select only these bytes"
- characters "select only these characters"
- delimiter "use DELIM instead of TAB for field delimiter"
- fields "select only these fields and lines without the delimiter character"
- n "(ignored)"
- complement "complement the set of selected bytes, characters or fields"
- only-delimited "do not print lines not containing delimiters"
- output-delimiter "use STRING as the output delimiter"
- help "display this help and exit"
- version "output version information and exit"
- )
+ _cut_args=(
+ bytes "select only these bytes"
+ characters "select only these characters"
+ delimiter "use DELIM instead of TAB for field delimiter"
+ fields "select only these fields and lines without the delimiter character"
+ n "(ignored)"
+ complement "complement the set of selected bytes, characters or fields"
+ only-delimited "do not print lines not containing delimiters"
+ output-delimiter "use STRING as the output delimiter"
+ help "display this help and exit"
+ version "output version information and exit"
+ )
;;
esac
_arguments \
- '(--bytes -b)'{--bytes=,-b+}'['$_cut_args[bytes]']:list' \
- '(--characters -c)'{--characters=,-c+}'['$_cut_args[characters]']:list' \
- '(--delimiter -d)'{--delimiter=,-d+}'['$_cut_args[delimiter]']:delimeter' \
- '(--fields -f)'{--fields=,-f+}'['$_cut_args[fields]']:list' \
- '-n['$_cut_args[n]']' \
- '--complement['$_cut_args[complement]']' \
- '(--only-delimited -s)'{--only-delimited,-s}'['$_cut_args[only-delimited]']' \
- '--output-delimiter=['$_cut_args[output-delimiter]']:delimeter' \
- '--help['$_cut_args[help]']' \
- '--version['$_cut_args[version]']' \
- '*:file:_files'
+ '(--bytes -b)'{--bytes=,-b+}'['$_cut_args[bytes]']:list' \
+ '(--characters -c)'{--characters=,-c+}'['$_cut_args[characters]']:list' \
+ '(--delimiter -d)'{--delimiter=,-d+}'['$_cut_args[delimiter]']:delimiter' \
+ '(--fields -f)'{--fields=,-f+}'['$_cut_args[fields]']:list' \
+ '-n['$_cut_args[n]']' \
+ '--complement['$_cut_args[complement]']' \
+ '(--only-delimited -s)'{--only-delimited,-s}'['$_cut_args[only-delimited]']' \
+ '--output-delimiter=['$_cut_args[output-delimiter]']:delimiter' \
+ '(- *)--help['$_cut_args[help]']' \
+ '(- *)--version['$_cut_args[version]']' \
+ '*:file:_files'
else
_arguments \
'-b[list specifies byte positions]:list:' \
'-c[list specifies character positions]:list:' \
- '-d[use alternate delimeter]:delimeter:' \
+ '-d[use alternate delimiter]:delimiter' \
'-f[list specifies fields]:list:' \
'-n[do not split multi-byte characters]' \
- '-s[suppress lines with no delimeters]' \
+ '-s[suppress lines with no delimiters]' \
'*:file:_files'
fi
diff --git a/Completion/Unix/Command/_devtodo b/Completion/Unix/Command/_devtodo
index 06fc675fc..2800f4a31 100644
--- a/Completion/Unix/Command/_devtodo
+++ b/Completion/Unix/Command/_devtodo
@@ -8,9 +8,11 @@ typeset -i i
typeset expl
for ((i=2; i <= $#words; i++)) {
- if [[ $words[$i] == '--database' ]] {
+ if [[ $words[$i] == '--database' ]]; then
todo_opts+=(--database ${~words[$((++i))]})
- }
+ elif [[ $words[$i] == '--sort' ]]; then
+ todo_opts+=(--sort ${words[$((++i))]})
+ fi
}
priorities=(verylow low medium high veryhigh)
diff --git a/Completion/Unix/Command/_django b/Completion/Unix/Command/_django
index 30a46d23b..ac20409eb 100644
--- a/Completion/Unix/Command/_django
+++ b/Completion/Unix/Command/_django
@@ -59,7 +59,7 @@ case $state in
)
for cmd in $(./manage.py --help 2>&1 >/dev/null | \
- awk -vdrop=1 '{ if (!drop) print substr($0, 3) } /^Available subcommands/ { drop=0 }')
+ awk -v drop=1 '{ if (!drop) print substr($0, 3) } /^Available subcommands/ { drop=0 }')
do
if ! echo $subcommands | grep -qs "${cmd}:"
then
diff --git a/Completion/Unix/Command/_du b/Completion/Unix/Command/_du
index 9974d72e9..9ae6e9cb3 100644
--- a/Completion/Unix/Command/_du
+++ b/Completion/Unix/Command/_du
@@ -47,6 +47,24 @@ if _pick_variant gnu=Free\ Soft unix --version /dummy/no-such-file; then
return ret
+elif [[ "$OSTYPE" == darwin* ]]; then
+ _arguments -s -A "-*" \
+ '(-H -L -P)-H[follow symlinks on the command line]' \
+ '(-H -L -P)-L[follow all symlinks]' \
+ '(-H -L -P)-P[do not follow symlinks (default)]' \
+ '*-I+[ignore files/directories matching specified mask]:mask' \
+ '(-a -s -d)-a[display entry also for files (not just directories) in file hierarchy]' \
+ '(-a -s -d)-d+[display entry for directories up to specified depth]:depth' \
+ '(-a -s -d)-s[display entry only for files/directories specified on the command line]' \
+ '(-h -k -m -g)-h[human readable output]' \
+ '(-h -k -m -g)-k[use block size of 1K-byte]' \
+ '(-h -k -m -g)-m[use block size of 1M-byte]' \
+ '(-h -k -m -g)-g[use block size of 1G-byte]' \
+ '-c[display grand total]' \
+ '-r[notify about unreadable files/directories]' \
+ '-x[exclude directories on different file systems]' \
+ '*:file:_files'
+
else
# based on $OSTYPE = solaris2.8
local xdev='[skip directories on different filesystems]'
diff --git a/Completion/Unix/Command/_etags b/Completion/Unix/Command/_etags
new file mode 100644
index 000000000..d1644fded
--- /dev/null
+++ b/Completion/Unix/Command/_etags
@@ -0,0 +1,63 @@
+#compdef etags
+
+integer ret=1
+local context state line expl
+typeset -A opt_args
+
+_arguments \
+ '(-a --append)'{-a,--append}'[append tag entries]' \
+ '--packages-only[only generate tags for Ada packages]' \
+ '--declarations[C etc.: tags for function declarations]' \
+ '(-D --no-defines)'{-D,--no-defines}'[No tags for preprocessor definitions]' \
+ {-i-,--include=}'[Tag file should include another]:tag file:_files' \
+ {-l-,--language=}'[Specify language]:language:->lang' \
+ '--no-globals[No tag entries for global variables]' \
+ '--no-members[No tag entries for structure members]' \
+ {-r-,--regex=}'[Specify regular expression]:regular expression:->regex' \
+ {-R,--no-regex}'[No regular expressions for tags]' \
+ '(-I --ignore-indentation)'{-I,--ignore-indentation}'[Closing brace in first col may not be start of func]' \
+ '(-o --output)'{-o-,--output=}'[Specify output file]:file:_files' \
+ '--parse-stdin=[Specify file name for stdin]:file name:_files' \
+ '(-V --version)'{-V,--version}'[Output version]' \
+ '(-h --help)'{-h,--help}'[Output help]' \
+ '*:file to tag:_files' \
+ && ret=0
+
+case $state in
+ (lang)
+ local -a langs
+ langs=(${${${${(f)"$(etags --help)"}:#^ [^[:blank:]]##[[:blank:]]##([[:alnum:].]*|)}# }%%[[:blank:]]*})
+ _wanted languages expl language compadd -a langs && ret=0
+ ;;
+
+ (regex)
+ if compset -P @; then
+ _files && ret=0
+ elif [[ -n $PREFIX ]]; then
+ local sep=$PREFIX[1]
+ [[ $sep = [\\*?#] ]] && sep="\\$sep"
+ local -a match mbegin mend
+ if compset -P "$sep*$sep*$sep"; then
+ local mods=smi
+ mods=${mods//[${PREFIX}]}
+ if [[ -n $mods ]]; then
+ compset -P '*'
+ local -a modarr
+ [[ $mods = *i* ]] && modarr+=("i:ignore case")
+ [[ $mods = *m* ]] && modarr+=("m:allow multi-line matches")
+ [[ $mods = *s* ]] && modarr+=("s:multi-line, dot matches newline")
+ _describe -t modifiers modifier modarr && ret=0
+ fi
+ elif compset -P "$sep*$sep"; then
+ _message "tagname" && ret=0
+ else
+ compset -P "$sep"
+ _message "tag regexp" && ret=0
+ fi
+ else
+ _message "regexp separator or @ for file" && ret=0
+ fi
+ ;;
+esac
+
+return ret
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 2b6a36956..119a705f6 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -64,8 +64,9 @@ _git-add () {
'(-i --interactive : -)'{-i,--interactive}'[add contents interactively to index]' \
'(-p --patch)'{-p,--patch}'[like -i but go directly into patch mode for specified files]' \
'(-e --edit)'{-e,--edit}'[open diff against index in editor]' \
- '(-u --update -A --all)'{-u,--update}'[update only files git already knows about]' \
- '(-A --all -u --update)'{-A,--all}'[act as both add . and add -u]' \
+ '(-A --all --no-ignore-removal -u --update --no-all --ignore-removal)'{-A,--all,--no-ignore-removal}'[add, modify, and remove index entries to match the working tree]' \
+ '(-A --all --no-ignore-removal -u --update --no-all --ignore-removal)'{--no-all,--ignore-removal}'[like "--all" but ignore removals]' \
+ '(-A --all --no-ignore-removal -u --update --no-all --ignore-removal)'{-u,--update}'[update the index just where it already has an entry matching <pathspec>]' \
'(-N --intent-to-add)'{-N,--intent-to-add}'[record only that path will be added later]' \
'--refresh[do not add files, but refresh their stat() info in index]' \
'--ignore-errors[continue adding if an error occurs]' \
@@ -104,6 +105,7 @@ _git-am () {
_arguments -S \
'(-s --signoff)'{-s,--signoff}'[add Signed-off-by: line to the commit message]' \
'(-k --keep)'{-k,--keep}'[pass -k to git mailinfo]' \
+ '--keep-non-patch[pass -b to git mailinfo]' \
'( --no-keep-cr)--keep-cr[pass --keep-cr to git mailsplit]' \
'(--keep-cr )--no-keep-cr[do not pass --keep-cr to git mailsplit]' \
'(-c --scissors --no-scissors)'{-c,--scissors}'[strip everything before a scissors line]' \
@@ -277,12 +279,13 @@ _git-bisect () {
(( $+functions[_git-branch] )) ||
_git-branch () {
- declare l c m d
+ declare l c m d e
- l='--color --no-color -r -a -v --verbose --abbrev --no-abbrev'
- c='-l -f --force -t --track --no-track --set-upstream --contains --merged --no-merged'
- m='-m -M'
- d='-d -D'
+ l='--color --no-color -r -a -v --verbose --abbrev --no-abbrev --list'
+ c='-l -f --force -t --track --no-track -u --set-upstream --set-upstream-to --unset-upstream --contains --merged --no-merged'
+ m='-m --move -M'
+ d='-d --delete -D'
+ e='--edit-description'
declare -a dependent_creation_args
if (( words[(I)-r] == 0 )); then
@@ -312,27 +315,33 @@ _git-branch () {
fi
_arguments -w -S -s \
- "($c $m $d --no-color :)--color=-[turn on branch coloring]:: :__git_color_whens" \
- "($c $m $d : --color)--no-color[turn off branch coloring]" \
- "($c $m -a)-r[list or delete only remote-tracking branches]" \
- "($c $m $d : -r)-a[list both remote-tracking branches and local branches]" \
- "($c $m $d : -v --verbose)"{-v,--verbose}'[show SHA1 and commit subject line for each head]' \
- "($c $m $d :)--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length" \
- "($c $m $d :)--no-abbrev[do not abbreviate sha1s]" \
- "($l $m $d)-l[create the branch's reflog]" \
- "($l $m $d -f --force)"{-f,--force}"[force the creation of a new branch]" \
- "($l $m $d -t --track)"{-t,--track}"[set up configuration so that pull merges from the start point]" \
- "($l $m $d)--no-track[override the branch.autosetupmerge configuration variable]" \
- "($l $m $d)--set-upstream[set up configuration so that pull merges]" \
- "($l $m $d)--contains=[only list branches which contain the specified commit]: :__git_committishs" \
- "($l $m $d)--merged=[only list branches which are fully contained by HEAD]: :__git_committishs" \
- "($l $m $d)--no-merged=[do not list branches which are fully contained by HEAD]: :__git_committishs" \
+ "($c $m $d $e --no-color :)--color=-[turn on branch coloring]:: :__git_color_whens" \
+ "($c $m $d $e : --color)--no-color[turn off branch coloring]" \
+ "($c $m $d $e --no-column)"'--column=[display tag listing in columns]:column.branch option:((always\:"always show in columns" never\:"never show in columns" auto\:"show in columns if the output is to the terminal" column\:"fill columns before rows (default)" row\:"fill rows before columns" plain\:"show in one column" dense\:"make unequal size columns to utilize more space" nodense\:"make equal size columns"))' \
+ "($c $m $d $e --column)"'--no-column[do not display in columns]' \
+ "($c $m $d $e )*--list[list only branches matching glob]:pattern" \
+ "($c $m $e -a)-r[list or delete only remote-tracking branches]" \
+ "($c $m $d $e: -r)-a[list both remote-tracking branches and local branches]" \
+ "($c $m $d $e : -v -vv --verbose)"{-v,-vv--verbose}'[show SHA1 and commit subject line for each head]' \
+ "($c $m $d $e :)--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length" \
+ "($c $m $d $e :)--no-abbrev[do not abbreviate sha1s]" \
+ "($l $m $d $e)-l[create the branch's reflog]" \
+ "($l $m $d $e -f --force)"{-f,--force}"[force the creation of a new branch]" \
+ "($l $m $d $e -t --track)"{-t,--track}"[set up configuration so that pull merges from the start point]" \
+ "($l $m $d $e)--no-track[override the branch.autosetupmerge configuration variable]" \
+ "($l $m $d $e -u --set-upstream --set-upstream-to --unset-upstream)"{-u,--set-upstream-to=}"[set up configuration so that pull merges]:remote-branches:__git_remote_branch_names" \
+ "($l $m $d $e -u --set-upstream --set-upstream-to --unset-upstream)--unset-upstream[remove upstream configuration]" \
+ "($l $m $d $e)--contains=[only list branches which contain the specified commit]: :__git_committishs" \
+ "($l $m $d $e)--merged=[only list branches which are fully contained by HEAD]: :__git_committishs" \
+ "($l $m $d $e)--no-merged=[do not list branches which are fully contained by HEAD]: :__git_committishs" \
+ "($c $l $m $d)--edit-description[edit branch description]" \
$dependent_creation_args \
- "($l $c $d -M)-m[rename a branch and the corresponding reflog]" \
- "($l $c $d -m)-M[rename a branch even if the new branch-name already exists]" \
+ "($l $c $d $m $e)"{-m,--move}"[rename a branch and the corresponding reflog]" \
+ "($l $c $d $m $e)-M[rename a branch even if the new branch-name already exists]" \
$dependent_modification_args \
- "($l $c $m -D)-d[delete a fully merged branch]" \
- "($l $c $m -d)-D[delete a branch]" \
+ "($l $c $m $d $e)"{-d,--delete}"[delete a fully merged branch]" \
+ "($l $c $m $d $e)-D[delete a branch]" \
+ {-q,--quiet}"[be more quiet]" \
$dependent_deletion_args
}
@@ -390,6 +399,23 @@ _git-bundle () {
return ret
}
+(( $+functions[_git-check-ignore] )) ||
+_git-check-ignore () {
+ _arguments \
+ '(-q --quiet)'{-q,--quiet}'[do not output anything, just set exit status]' \
+ '(-v --verbose)'{-v,--verbose}'[output details about the matching pattern (if any) for each pathname]' \
+ '--stdin[read file names from stdin instead of from the command-line]' \
+ '-z[make output format machine-parseable]' \
+ '(-n --non-matching)'{-n,--non-matching}'[show given paths which do not match any pattern]' \
+ '*:: :->file' && ret=0
+}
+
+(( $+functions[_git-check-mailmap] )) ||
+_git-check-mailmap () {
+ _arguments \
+ '--stdin[read contacts from stdin after those given on the command line]'
+}
+
(( $+functions[_git-checkout] )) ||
_git-checkout () {
# TODO: __git_tree_ishs is just stupid. It should be giving us a list of tags
@@ -414,6 +440,7 @@ _git-checkout () {
'(--patch)--no-track[override the branch.autosetupmerge configuration variable]' \
$new_branch_reflog_opt \
'(-b -B -t --track --patch)--orphan[create a new orphan branch based at given commit]: :__git_branch_names' \
+ '--ignore-skip-worktree-bits[ignores patterns and adds back any files in <paths>]' \
'(-q --quiet -f --force -m --merge --conflict --patch)'{-m,--merge}'[3way merge current branch, working tree and new branch]' \
'(-q --quiet -f --force -m --merge --patch)--conflict[same as --merge, using given merge style]:style:(merge diff3)' \
'(-)'{-p,--patch}'[interactively select hunks in diff between given tree-ish and working tree]' \
@@ -430,22 +457,27 @@ _git-checkout () {
if (( CURRENT == 1 )) && [[ -z $opt_args[(I)--] ]]; then
# TODO: Allow A...B
local branch_arg='branches::__git_revisions' \
+ remote_branch_noprefix_arg='remote branches::__git_remote_branch_names_noprefix' \
tree_ish_arg='tree-ishs::__git_tree_ishs' \
file_arg='modified-files::__git_modified_files'
if [[ -n ${opt_args[(I)-b|-B|--orphan]} ]]; then
+ remote_branch_noprefix_arg=
tree_ish_arg=
file_arg=
elif [[ -n $opt_args[(I)--track] ]]; then
branch_arg='remote-branches::__git_remote_branch_names'
+ remote_branch_noprefix_arg=
tree_ish_arg=
file_arg=
elif [[ -n ${opt_args[(I)--ours|--theirs|-m|--conflict|--patch]} ]]; then
branch_arg=
+ remote_branch_noprefix_arg=
fi
_alternative \
$branch_arg \
+ $remote_branch_noprefix_arg \
$tree_ish_arg \
$file_arg && ret=0
elif [[ -n ${opt_args[(I)-b|-B|-t|--track|--orphan]} ]]; then
@@ -464,11 +496,18 @@ _git-checkout () {
(( $+functions[_git-cherry-pick] )) ||
_git-cherry-pick () {
_arguments \
+ '(- :)--quit[end revert or cherry-pick sequence]' \
+ '(- :)--continue[resume revert or cherry-pick sequence]' \
+ '(- :)--abort[cancel revert or cherry-pick sequence]' \
+ '--allow-empty-message[allow replaying a commit with an empty message]' \
+ '--keep-redundant-commits[keep cherry-picked commits that will become empty]' \
'(-e --edit --ff)'{-e,--edit}'[edit commit before committing the revert]' \
'(--ff)-x[append information about what commit was cherry-picked]' \
'(-m --mainline)'{-m,--mainline}'[specify mainline when cherry-picking a merge commit]:parent number' \
'(-n --no-commit --ff)'{-n,--no-commit}'[do not make the actually commit]' \
'(-s --signoff --ff)'{-s,--signoff}'[add Signed-off-by line at the end of the commit message]' \
+ '*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' \
+ '*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]' \
'(-e --edit -x -n --no-commit -s --signoff)--ff[fast forward, if possible]' \
': :__git_revisions'
}
@@ -486,6 +525,7 @@ _git-clean () {
_arguments -w -C -S -s \
'-d[also remove untracked directories]' \
'(-f --force)'{-f,--force}'[required when clean.requireForce is true (default)]' \
+ '(-i --interactive)'{-i,--interactive}'[show what would be done and clean files interactively]' \
'(-n --dry-run)'{-n,--dry-run}'[only show what would and what would not be removed]' \
'(-q --quiet)'{-q,--quiet}'[only report errors]' \
'*'{-e,--exclude=}'[skip files matching specified pattern]:pattern' \
@@ -543,7 +583,8 @@ _git-clone () {
# TODO: Argument to -b should complete branch names in the repository being
# cloned.
_arguments -w -C -S -s \
- '(-l --local)'{-l,--local}'[clone locally, hardlink refs and objects if possible]' \
+ '(-l --local --no-local)'{-l,--local}'[clone locally, hardlink refs and objects if possible]' \
+ '(-l --local --no-local)--no-local[override --local, as if file:/// URL was given]' \
'--no-hardlinks[copy files instead of hardlinking when doing a local clone]' \
'(-s --shared)'{-s,--shared}'[share the objects with the source repository (warning: see man page)]' \
'--reference[reference repository]:repository:_directories' \
@@ -557,7 +598,9 @@ _git-clone () {
'(-b --branch)'{-b,--branch}'[point HEAD to the given branch]: :__git_guard_branch-name' \
'(-u --upload-pack)'{-u,--upload-pack=}'[specify path to git-upload-pack on remote side]:remote path' \
'--template=[directory to use as a template for the object database]: :_directories' \
+ '*'{-c,--config}'[<key>=<value> set a configuration variable in the newly created repository]' \
'--depth[create a shallow clone, given number of revisions deep]: :__git_guard_number depth' \
+ '--single-branch[clone only history leading up to the main branch or the one specified by -b]' \
'--recursive[initialize all contained submodules]' \
': :->repository' \
': :_directories' && ret=0
@@ -575,6 +618,18 @@ _git-clone () {
return ret
}
+(( $+functions[_git-column] )) ||
+_git-column () {
+ _arguments -w -S -s \
+ '--command=[look up layout mode using config vars column.<name> and column.ui]' \
+ '--mode=[specify layout mode. See configuration variable column.ui for option syntax]' \
+ '--raw-mode=[same as --mode but take mode encoded as a number]' \
+ '--width=[specify the terminal width]' \
+ '--indent=[string to be printed at the beginning of each line]' \
+ '--nl[string to be printed at the end of each line, including newline character]' \
+ '--padding[the number of spaces between columns. One space by default]'
+}
+
(( $+functions[_git-commit] )) ||
_git-commit () {
local amend_opt='--amend[amend the tip of the current branch]'
@@ -587,25 +642,29 @@ _git-commit () {
reset_author_opt='(--author)--reset-author[make committer the author of the commit]'
fi
- # TODO: --null is an undocumented alias.
# TODO: --interactive isn’t explicitly listed in the documentation.
_arguments -w -S -s \
'(-a --all --interactive -o --only -i --include *)'{-a,--all}'[stage all modified and deleted paths]' \
+ '--fixup=[construct a commit message for use with rebase --autosquash]:' \
+ '--squash=[construct a commit message for use with rebase --autosquash]:' \
$reset_author_opt \
'( --porcelain --dry-run)--short[output dry run in short format]' \
'(--short --dry-run)--porcelain[output dry run in porcelain-ready format]' \
'(--short --porcelain --dry-run -z --null)'{-z,--null}'[separate dry run entry output with NUL]' \
+ '--patch[use the interactive patch selection interface to chose which changes to commit]' \
'(--reset-author)--author[override the author name used in the commit]:author name' \
'--date=[override the author date used in the commit]:date' \
'(-s --signoff)'{-s,--signoff}'[add Signed-off-by line at the end of the commit message]' \
'(-n --no-verify)'{-n,--no-verify}'[do not look for suspicious lines the commit introduces]' \
'--allow-empty[allow recording an empty commit]' \
'--allow-empty-message[allow recording a commit with an empty message]' \
- '--cleanup=[specify how the commit message should be cleaned up]:mode:((verbatim\:"don'\''t change the commit message at all"
+ '--cleanup=[specify how the commit message should be cleaned up]:mode:((verbatim\:"do not change the commit message at all"
whitespace\:"remove leading and trailing whitespace lines"
strip\:"remove both whitespace and commentary lines"
default\:"act as '\''strip'\'' if the message is to be edited and as '\''whitespace'\'' otherwise"))' \
- '(-e --edit)'{-e,--edit}'[edit the commit message before committing]' \
+ '(-e --edit --no-edit)'{-e,--edit}'[edit the commit message before committing]' \
+ '(-e --edit --no-edit)--no-edit[do not edit the commit message before committing]' \
+ '--no-post-rewrite[bypass the post-rewrite hook]' \
'(-a --all --interactive -o --only -i --include)'{-i,--include}'[update the given files and commit the whole index]' \
'(-a --all --interactive -o --only -i --include)'{-o,--only}'[commit only the given files]' \
'(-u --untracked-files)'{-u-,--untracked-files=}'[show files in untracked directories]::mode:((no\:"show no untracked files"
@@ -616,6 +675,7 @@ _git-commit () {
'--dry-run[only show list of paths that are to be commited or not, and any untracked]' \
'( --no-status)--status[include the output of git status in the commit message template]' \
'(--status )--no-status[do not include the output of git status in the commit message template]' \
+ '(-S --gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \
'(-a --all --interactive -o --only -i --include *)--interactive[interactively update paths in the index file]' \
'*: :__git_ignore_line_inside_arguments __git_changed_files' \
- '(message)' \
@@ -641,6 +701,7 @@ _git-describe () {
'(--abbrev)--long[always show full format, even for exact matches]' \
'--match=[only consider tags matching glob pattern]:pattern' \
'--always[show uniquely abbreviated commit object as fallback]' \
+ '--first-parent[follow only the first parent of merge commits]' \
'*: :__git_committishs'
}
@@ -788,14 +849,18 @@ _git-format-patch () {
'(--thread )--no-thread[do not thread messages]' \
'--in-reply-to=[make the first mail a reply to the given message]:message id' \
'--ignore-if-in-upstream[do not include a patch that matches a commit in the given range]' \
+ '(-v --reroll-count)'{-v,--reroll-count=}'[mark the series as the <n>-th iteration of the topic]: :__git_guard_number iteration' \
'(-k --keep-subject)--subject-prefix=[use the given prefix instead of \[PATCH\]]:prefix' \
'*--to=[add To: header to email headers]: :_email_addresses' \
'*--cc=[add Cc: header to email headers]: :_email_addresses' \
+ '--from=[add From: header to email headers]: :_email_addresses' \
'*--add-header=[add an arbitrary header to email headers]:header' \
'--cover-letter[generate a cover letter template]' \
+ '--notes=[append notes for the commit after the three-dash line]:: :__git_notes_refs' \
'( --no-signature)--signature=[add a signature]:signature' \
'(--signature )--no-signature[do not add a signature]' \
'--suffix=[use the given suffix for filenames]:filename suffix' \
+ '--quiet[suppress the output of the names of generated files]' \
'--no-binary[do not output contents of changes in binary files, only note that they differ]' \
'--root[treat the revision argument as a range]' \
': :->commit-or-commit-range' && ret=0
@@ -842,19 +907,23 @@ _git-grep () {
_arguments -C -A '-*' \
'(-O --open-files-in-pager --no-index)--cached[search blobs registered in index file instead of working tree]' \
'(--cached)--no-index[search files in current directory, not just treacked files]' \
+ '(--exclude-standard)--no-exclude-standard[also search in ignored files]' \
+ '(--no-exclude-standard)--exclude-standard[exclude files standard ignore mechanisms]' \
+ '--untracked[search in untracked files]' \
'(-a --text)'{-a,--text}'[process binary files as if they were text]' \
'(-i --ignore-case)'{-i,--ignore-case}'[ignore case when matching]' \
'-I[do not match pattern in binary files]' \
- '--max-depth=[descend at most given levels of directories]:__git_guard_number depth' \
+ '--max-depth=[descend at most given levels of directories]: :__git_guard_number depth' \
'(-w --word-regexp)'{-w,--word-regexp}'[match only whole words]' \
'(-v --invert-match)'{-v,--invert-match}'[select non-matching lines]' \
'( -H)-h[supress output of filenames]' \
'(-h )-H[show filenames]' \
'--full-name[output paths relative to the project top directory]' \
- '(-E --extended-regexp -G --basic-regexp)'{-E,--extended-regexp}'[use POSIX extended regexes]' \
- '(-E --extended-regexp -G --basic-regexp)'{-G,--basic-regexp}'[use POSIX basic regexes]' \
- '(-F --fixed-strings)'{-F,--fixed-strings}'[do not interpret pattern as a regex]' \
- '-n[prefix the line number to matching lines]' \
+ '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-E,--extended-regexp}'[use POSIX extended regexes]' \
+ '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-G,--basic-regexp}'[use POSIX basic regexes]' \
+ '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-P,--perl-regexp}'[use perl-compatible regexes]' \
+ '(-E --extended-regexp -G --basic-regexp -P --perl-regexp -F --fixed-strings)'{-F,--fixed-strings}'[do not interpret pattern as a regex]' \
+ '(-n --line-number)'{-n,--line-number}'[prefix the line number to matching lines]' \
'(-l --files-with-matches -L --files-without-match --name-only)'{-l,--files-with-matches,--name-only}'[show only names of matching files]' \
'(-l --files-with-matches -L --files-without-match)'{-L,--files-without-match}'[show only names of non-matching files]' \
'(--cached -O --open-files-in-pager)'{-O,--open-files-in-pager}'=-[open matching files in pager]::_path_commands' \
@@ -862,10 +931,13 @@ _git-grep () {
'(-c --count)'{-c,--count}'[show number of matching lines in files]' \
'( --no-color)--color=-[color matches]:: :__git_color_whens' \
'(--color )---no-color[do not color matches]' \
- '-A[show trailing context]: :__git_guard_number lines' \
- '-B[show leading context]: :__git_guard_number lines' \
- '-C[show context]: :__git_guard_number lines' \
+ '--break[prefix the line number to matching lines]' \
+ '--heading[show the filename above the matches]' \
+ '(-A --after-context)'{-A,--after-context=}'[show <num> trailing lines, and separate groups of matches]: :__git_guard_number lines' \
+ '(-B --before-context)'{-B,--before-context=}'[show <num> leading lines, and separate groups of matches]: :__git_guard_number lines' \
+ '(-A --after-context -B --before-context -C --context)'{-C,--context=}'[show <num> leading and trailing lines, and separate groups of matches]: :__git_guard_number lines' \
'(-p --show-function)'{-p,--show-function}'[show preceding line containing function name of match]' \
+ '(-W --function-context)'{-W,--function-context}'[show whole function where a match was found]' \
'(1)*-f[read patterns from given file]:pattern file:_files' \
'(1)*-e[use the given pattern for matching]:pattern' \
$pattern_operators \
@@ -979,6 +1051,7 @@ _git-init () {
'--bare[create a bare repository]' \
'--template=[directory to use as a template for the object database]: :_directories' \
'--shared=[share repository amongst several users]:: :__git_repository_permissions' \
+ '--separate-git-dir=[create git dir elsewhere and link it using the gitdir mechanism]:: :_directories' \
':: :_directories'
}
@@ -996,6 +1069,7 @@ _git-log () {
$log_options \
$revision_options \
$diff_options \
+ '-L+[trace the evolution of a line range or regex within a file]:range' \
'(-)--[start file arguments]' \
'*:: :->commit-range-or-file' && ret=0
@@ -1039,6 +1113,7 @@ _git-merge () {
'-m[set the commit message to be used for the merge commit]:merge message' \
'( --no-rerere-autoupdate)--rerere-autoupdate[allow the rerere mechanism to update the index]' \
'(--rerere-autoupdate )--no-rerere-autoupdate[do not allow the rerere mechanism to update the index]' \
+ '--abort[restore the original branch and abort the merge operation]' \
'*: :__git_commits'
}
@@ -1085,6 +1160,7 @@ _git-notes () {
copy:'copy notes from one object to another'
append:'append notes to a given object'
edit:'edit notes for a given object'
+ merge:'merge the given notes ref into the current ref'
show:'show notes for a given object'
remove:'remove notes for a given object'
prune:'remove all notes for non-existing/unreachable objects')
@@ -1119,6 +1195,15 @@ _git-notes () {
': :__git_commits' \
': :__git_commits' && ret=0
;;
+ (merge)
+ _arguments -w -S -s \
+ '(-s --strategy)--abort[abort an in-progress notes merge]' \
+ '(-s --strategy)--commit[finalize an in-progress notes merge]' \
+ {-q,--quiet}'[be quiet]' \
+ {-v,--verbose}'[be more verbose]' \
+ '(--abort --commit)'{-s,--strategy=}'[resolve conflicts using the given strategy]' \
+ ': :__git_notes_refs' && ret=0
+ ;;
(append)
_arguments -w -S -s \
'*'{-m,--message=}'[use given note message]:message' \
@@ -1160,20 +1245,25 @@ _git-push () {
# later on to match the remote end.
_arguments -w -S -s \
'--all[push all refs under refs/heads/]' \
+ '--prune[remove remote branches that do not have a local counterpart]' \
'--mirror[push all refs under refs/heads/ and refs/tags/ and delete non-existing refs]' \
'(-n --dry-run)'{-n,--dry-run}'[do everything except actually send the updates]' \
'--porcelain[produce machine-readable output]' \
'--delete[delete all listed refs from the remote repository]' \
'--tags[all tags under refs/tags are pushed]' \
+ '--follow-tags[also push missing annotated tags reachable from the pushed refs]' \
'(--receive-pack --exec)'{--receive-pack=-,--exec=-}'[path to git-receive-pack on remote]:remote git-receive-pack:_files' \
'(-f --force)'{-f,--force}'[allow refs that are not ancestors to be updated]' \
'(:)--repo=[default repository to use]:repository:__git_any_repositories' \
- '(-u --set-upstream)'{-u,--set-upstream}'[add upstream reference for each branch that is up to date or pushed]' \
+ '(-u --set-upstream-to)'{-u,--set-upstream-to}'[add upstream reference for each branch that is up to date or pushed]' \
'( --no-thin)--thin[try to minimize number of objects to be sent]' \
'(--thin )--no-thin[do not try to minimize number of objects to be sent]' \
'(-q --quiet -v --verbose --progress)'{-q,--quiet}'[suppress all output]' \
'(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]' \
'(-q --quiet)--progress[output progress information]' \
+ '(--verify)--no-verify[bybass the pre-push hook]' \
+ '--recurse-submodules=[submodule handling]:submodule handling:((check\:"refuse pushing of supermodule if submodule commit cannot be found on the remote"
+ on-demand\:"push all changed submodules"))' \
':: :__git_any_repositories' \
'*: :__git_ref_specs'
}
@@ -1182,7 +1272,7 @@ _git-push () {
_git-rebase () {
local -a autosquash_opts
- if (( words[(I)--interactive] )); then
+ if (( words[(I)-i|--interactive] )); then
autosquash_opts=(
'( --no-autosquash)--autosquash[check for auto-squash boundaries]'
'(--autosquash )--no-autosquash[do not check for auto-squash boundaries]')
@@ -1191,6 +1281,7 @@ _git-rebase () {
_arguments -A '-*' \
'(- :)--continue[continue after resolving merge conflict]' \
'(- :)--abort[abort current rebase]' \
+ '--keep-empty[keep empty commits in the result]' \
'(- :)--skip[skip the current patch]' \
'(-m --merge)'{-m,--merge}'[use merging strategies to rebase]' \
'*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' \
@@ -1204,7 +1295,9 @@ _git-rebase () {
'(-i --interactive)--whitespace=-[detect a new or modified line that has whitespace errors]: :__git_apply_whitespace_strategies' \
'(-i --interactive)--committer-date-is-author-date[use author date as committer date]' \
'(-i --interactive --ignore-whitespace --whitespace --committer-date-is-author-date)'{-i,--interactive}'[make a list of commits to be rebased and open in $EDITOR]' \
+ '--edit-todo[edit interactive instruction sheet in an editor]' \
'(-p --preserve-merges --interactive)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \
+ {-x,--exec}'[with -i\: append "exec <cmd>" after each line]:command' \
'(1)--root[rebase all reachable commits]' \
$autosquash_opts \
'--no-ff[cherry-pick all rebased commits with --interactive, otherwise synonymous to --force-rebase]' \
@@ -1246,9 +1339,12 @@ _git-reset () {
(( $+functions[_git-revert] )) ||
_git-revert () {
_arguments -w -S -s \
+ '(- :)--quit[end revert or cherry-pick sequence]' \
+ '(- :)--continue[resume revert or cherry-pick sequence]' \
+ '(- :)--abort[cancel revert or cherry-pick sequence]' \
'(-e --edit --no-edit)'{-e,--edit}'[edit the commit before committing the revert]' \
+ '(-e --edit --no-edit)--no-edit[do not edit the commit message before committing the revert]' \
'(-m --mainline)'{-m+,--mainline=}'[pick which parent is mainline]:parent number' \
- '(-e --edit)--no-edit[do not edit the commit message]' \
'(-n --no-commit)'{-n,--no-commit}'[do not commit the reversion]' \
'(-s --signoff)'{-s,--signoff}'[add Signed-off-by line at the end of the commit message]' \
': :__git_commits'
@@ -1270,11 +1366,7 @@ _git-rm () {
case $state in
(file)
- if [[ -n ${opt_args[(I)--cached]} ]]; then
- __git_changed-in-index_files && ret=0
- else
- __git_cached_files && ret=0
- fi
+ __git_cached_files && ret=0
;;
esac
@@ -1298,7 +1390,8 @@ _git-shortlog () {
'(-e --email)'{-e,--email}'[show email addres of each author]' \
'-w-[linewrap the output]:: :->wrap' \
$revision_options \
- '*: :__git_commits' && ret=0
+ '(-)--[start file arguments]' \
+ '*:: :->commit-range-or-file' && ret=0
case $state in
(wrap)
@@ -1314,6 +1407,30 @@ _git-shortlog () {
__git_guard_number 'line width'
fi
;;
+ (commit-range-or-file)
+ case $CURRENT in
+ (1)
+ if [[ -n ${opt_args[(I)--]} ]]; then
+ __git_cached_files && ret=0
+ else
+ _alternative \
+ 'commit-ranges::__git_commit_ranges' \
+ 'cached-files::__git_cached_files' && ret=0
+ fi
+ ;;
+ (*)
+ # TODO: Write a wrapper function that checks whether we have a
+ # committish range or comittish and calls __git_tree_files
+ # appropriately.
+ if __git_is_committish_range $line[1]; then
+ __git_tree_files ${PREFIX:-.} $(__git_committish_range_last $line[1]) && ret=0
+ elif __git_is_committish $line[1]; then
+ __git_tree_files ${PREFIX:-.} $line[1] && ret=0
+ else
+ __git_cached_files && ret=0
+ fi
+ ;;
+ esac
esac
return ret
@@ -1324,9 +1441,10 @@ _git-show () {
local curcontext=$curcontext state line ret=1
typeset -A opt_args
- local -a log_options revision_options
+ local -a log_options revision_options diff_options
__git_setup_log_options
__git_setup_revision_options
+ __git_setup_diff_options
_arguments -w -C -s \
$log_options \
@@ -1382,6 +1500,7 @@ _git-stash () {
'( --no-keep-index)--keep-index[all changes already added to the index are left intact]' \
'(--keep-index )--no-keep-index[all changes already added to the index are undone]' \
'(-q --quiet)'{-q,--quiet}'[suppress all output]' \
+ '(-u --include-untracked)'{-u,--include-untracked}'[include untracked files]' \
'::message' && ret=0
;;
(list)
@@ -1449,7 +1568,10 @@ _git-status () {
normal\:"show untracked files and directories" \
all\:"also show untracked files in untracked directories (default)"))' \
'--ignore-submodules[ignore changes to submodules]:: :__git_ignore_submodules_whens' \
+ '--ignored[show ignored files as well]' \
'(--porcelain)-z[use NUL termination on output]' \
+ '(--no-column)--column=-[display in columns]::column.status option:((always\:"always show in columns" never\:"never show in columns" auto\:"show in columns if the output is to the terminal" column\:"fill columns before rows (default)" row\:"fill rows before columns" plain\:"show in one column" dense\:"make unequal size columns to utilize more space" nodense\:"make equal size columns"))' \
+ '(--column)--no-column[do not display in columns]' \
'*: :__git_ignore_line_inside_arguments _files'
}
@@ -1458,7 +1580,7 @@ _git-submodule () {
local curcontext=$curcontext state line ret=1
declare -A opt_args
- _arguments -C -A '-*' \
+ _arguments -C \
'(-q --quiet)'{-q,--quiet}'[suppress all output]' \
': :->command' \
'*:: :->option-or-argument' && ret=0
@@ -1471,6 +1593,7 @@ _git-submodule () {
add:'add given repository as a submodule'
status:'show the status of a submodule'
init:'initialize a submodule'
+ deinit:'unregister a submodule'
update:'update a submodule'
summary:'show commit summary between given commit and working tree/index'
foreach:'evaluate shell command in each checked-out submodule'
@@ -1489,6 +1612,7 @@ _git-submodule () {
'(-q --quiet)'{-q,--quiet}'[suppress all output]' \
'(-b --branch)'{-b,--branch}'[branch of repository to add as submodule]' \
'(-f --force)'{-f,--force}'[allow adding an otherwise ignored submodule path]' \
+ '--name[use given name instead of defaulting to its path]:name' \
'--reference=[remote repository to clone]: :__git_any_repositories' \
': :__git_any_repositories' \
':: :_directories' && ret=0
@@ -1505,6 +1629,11 @@ _git-submodule () {
'(-q --quiet)'{-q,--quiet}'[suppress all output]' \
'*: :__git_ignore_line_inside_arguments __git_submodules' && ret=0
;;
+ (deinit)
+ _arguments -S \
+ '(-f --force)'{-f,--force}'[remove submodule worktree even if local modifications are present]' \
+ '*: :__git_ignore_line_inside_arguments __git_submodules' && ret=0
+ ;;
(update)
# TODO: --init not properly documented.
_arguments -S \
@@ -1514,6 +1643,7 @@ _git-submodule () {
'--rebase[rebase current branch onto commit recorded in superproject]' \
'--reference=[remote repository to clone]: :__git_any_repositories' \
'--recursive[traverse submodules recursively]' \
+ '--force[discard local changes by checking out the current up-to-date version]' \
'--init[initialize uninitialized submodules]' \
'*: :__git_ignore_line_inside_arguments __git_submodules' && ret=0
;;
@@ -1547,6 +1677,7 @@ _git-submodule () {
;;
(sync)
_arguments -S \
+ '--recursive[traverse submodules recursively]' \
'(-q --quiet)'{-q,--quiet}'[suppress all output]' \
'*: :__git_ignore_line_inside_arguments __git_submodules' && ret=0
;;
@@ -1572,10 +1703,11 @@ _git-tag () {
_arguments -A '-*' \
- creation \
- '( -s -u)-a[create an unsigned, annotated tag]' \
- '(-a -u)-s[create an signed and annotated tag]' \
- '(-a -s )-u[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \
+ '( -s -u --local-user)-a[create an unsigned, annotated tag]' \
+ '(-a -u --local-user)-s[create an signed and annotated tag]' \
+ '(-a -s)'{-u,--local-user}'[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \
'-f[replace existing tag]' \
+ '--cleanup=[cleanup message]:mode:((verbatim\:"no cleanup" whitespace\:"remove leading and trailing whitespace" strip\:"remove leading and trailing whitespace and comments"))' \
$message_opts \
': :__git_tags' \
':: :__git_commits' \
@@ -1585,7 +1717,10 @@ _git-tag () {
- listing \
'-n+[limit line output of annotation]: :__git_guard_number "limit"' \
'-l[list tags matching pattern]' \
+ '(--no-column)--column=-[display tag listing in columns]::column.tag option:((always\:"always show in columns" never\:"never show in columns" auto\:"show in columns if the output is to the terminal" column\:"fill columns before rows (default)" row\:"fill rows before columns" plain\:"show in one column" dense\:"make unequal size columns to utilize more space" nodense\:"make equal size columns"))' \
+ '(--column)--no-column[do not display in columns]' \
'--contains=[only list tags which contain the specified commit]: :__git_commits' \
+ '--points-at=[only list tags of the given object]: :__git_commits' \
'::pattern' \
- verification \
'-v[verifies gpg signutare of tags]' \
@@ -1630,7 +1765,6 @@ _git-config () {
value_arg=': :->value'
fi
- # TODO --local is undocumented.
_arguments -w -C -S -s \
'( --system --local -f --file)--global[use user-global config file]' \
'(--global --local -f --file)--system[use system-wide config file]' \
@@ -1657,26 +1791,47 @@ _git-config () {
'(2)--get-regexp[like "--get-all", but interpret "name" as a regular expression]' \
'(2 3 --bool --int --bool-or-int --path -z --null)--get-colorbool[check if color should be used]: :->gettable-colorbool-option' \
'(2 3 --bool --int --bool-or-int --path -z --null)--get-color[find color setting]: :->gettable-color-option' \
- '(-e --edit --bool --int --bool-or-int --path -z --null)'{-e,--edit}'[open config file for editing]' && ret=0
+ '(-e --edit --bool --int --bool-or-int --path -z --null)'{-e,--edit}'[open config file for editing]' \
+ '(--no-includes)'--includes'[respect "include.*" directives in config files when looking up values]' \
+ '(--includes)'--no-includes'[do not respect "include.*" directives]' && ret=0
# TODO: Most all _path_commands should be able to take arguments and so on.
# How do we deal with that and how do we quote the whole argument to git
# config?
- # TODO: Add merge.*.(name|driver|recursive) and diff.*.(command|funcname)
+ # TODO: Add support for merge.*. (merge driver), diff.*. (diff driver), and filter.*. (filter driver) options
# (see gitattributes(5)).
# TODO: .path options should take absolute paths.
declare -a git_options_static
git_options_static=(
advice.pushNonFastForward:'show advice when git push refuses non-fast-forward refs::->bool:true'
+ advice.pushUpdateRejected:'combined setting for advice.push*::->bool:true'
+ advice.pushNonFFCurrent:'show advice when git push fails due to a non-fast-forward update to the current branch::->bool:true'
+ advice.pushNonFFDefault:'show advice to set push.default to "upstream" or "current" after running git-push::->bool:true'
+ advice.pushNonFFMatching:'show advice when running git-push and pushed matching refs explicitly::->bool:true'
+ advice.pushAlreadyExists:'show advice when git-push rejects an update that does not qualify for fast-forwarding::->bool:true'
+ advice.pushFetchFirst:'show advice when git-push rejects an update that tries to overwrite a remote ref that points at unknown object::->bool:true'
+ advice.pushNeedsForce:'show advice when git-push rejects an update that tries to overwrite a remote ref that points a non-commitish::->bool:true'
advice.statusHints:'show advice in output of git status::->bool:true'
+ advice.statusUoption:'show advice to consider using the "-u" option to git-status when it takes more than 2 seconds::->bool:true'
advice.commitBeforeMerge:'show advice when git merge refuses to merge::->bool:true'
advice.resolveConflict:'show advice when conflict prevents operation from being performed::->bool:true'
advice.implicitIdentity:'show advice when identity is guessed from system settings::->bool:true'
advice.detachedHead:'show advice when entering detached-HEAD state::->bool:true'
+ advice.amWorkDir:'show the location of the patch file when git-am fails to apply it::->bool:true'
blame.blankboundary:'show blank SHA-1 for boundary commits::->bool:false'
blame.showroot:'show root commits as normal commits::->bool:false'
blame.date:'date format to use in output::__git_date_formats:iso'
+ 'branch.*.description:branch description:branch description:->string'
+ cvsexportcommit.cvsdir:'the default location of the CVS checkout to use for the export:cvs export dir:_directories'
+ column.ui:'specify whether supported commands should output in columns.::->column:never'
+ column.branch:'specify whether to output branch listing in git branch in columns::->column:never'
+ column.clean:'specify the layout when listing items in git clean -i::->column:never'
+ column.status:'specify whether to output untracked files in git status in columns::->column:never'
+ column.tag:'specify whether to output tag listing in git tag in columns::->column:never'
core.fileMode:'track changes to the executable bit of files::->bool:true'
+ core.attributesfile:'look into this file for attributes in addition to .gitattributes:additional attributes file:_files'
+ core.abbrev:'set the length object names are abbreviated to:length:->int:7'
+ core.commentchar:'comment character when using an editor::->string'
core.ignoreCygwinFSTricks:'use Cygwin stat()/lstat()::->bool:true'
core.ignorecase:'use workarounds for non-case-sensitive filesystems::->bool:false'
core.trustctime:'trust inode change time::->bool:true'
@@ -1698,6 +1853,7 @@ _git-config () {
core.loosecompression:'level of compression to apply to non-pack files::->compression:1'
core.packedGitWindowSize:'size of mappings of pack files:pack window size:->bytes'
core.packedGitLimit:'maximum number of bytes to map from pack files:maximum pack file map size:->bytes'
+ core.precomposeunicode:'revert the unicode decomposition of filenames done by Mac OS::->bool:false'
core.deltaBaseCacheLimit:'maximum size of cache for base objects:maximum base objects cache size:->bytes:16m'
core.bigFileThreshold:'maximum size of files to compress:maximum compress size:->bytes:512m'
core.excludesfile:'additional file to use for exclusion:excludes file:_files'
@@ -1708,9 +1864,17 @@ _git-config () {
core.fsyncobjectfiles:'fsync() when writing object files::->bool:false'
core.preloadindex:'use parallel index preload for operations like git diff::->bool:false'
core.createObject:'take steps to prevent overwriting existing objects::->core.createObject:link'
+ core.checkstat:'determine which stat fields to match between the index and work tree::->core.checkstat:default'
core.notesRef:'show notes in given refs:refs:->string:refs/notes/commits'
core.sparseCheckout:'use sparse checkout::->bool:false'
+ credential.helper:'external helper to be called when a username or password credential is needed::_path_commands'
+ credential.useHttpPath:'consider the "path" component of an http or https URL to be important::->bool:false'
+ credential.username:'If no username is set use this username by default:default username:->string'
+ 'credential.*.helper:external helper to be called when a username or password credential is needed::_path_commands'
+ 'credential.*.useHttpPath:consider the "path" component of an http or https URL to be important::->bool:false'
+ 'credential.*.username:if no username is set use this username by default:default username:->string'
add.ignore-errors:'ignore indexing errors when adding files::->bool:false'
+ add.ignoreErrors:'ignore indexing errors when adding files::->bool:false'
am.keepcr:'keep CR characters when splitting mails::->bool:false'
apply.ignorewhitespace:'ignore whitespace changes::->apply.ignorewhitespace:no'
apply.whitespace:'default value for the --whitespace option::->apply.whitespace:error'
@@ -1719,6 +1883,7 @@ _git-config () {
'branch.*.remote:what remote git fetch and git push should fetch form/push to::__git_remotes'
'branch.*.merge:default refspec to be marked for merging::__git_ref_specs'
'branch.*.mergeoptions:default options for merging::->branch.mergeoptions'
+ 'branch.*.pushremote:what remote git push should push to::__git_remotes'
'branch.*.rebase:rebase on top of fetched branch::->bool:false'
'browser.*.cmd:browser command to use:browser:_path_commands'
'browser.*.path:path to use for the browser:absolute browser path:_files -g "*(*)"'
@@ -1727,6 +1892,7 @@ _git-config () {
color.branch.current:'color of the current branch::->color'
color.branch.local:'color of a local branch::->color'
color.branch.remote:'color of a remote branch::->color'
+ color.branch.upstream:'color of upstream branches::->color'
color.branch.plain:'color of other branches::->color'
color.diff:'color output of git diff::->color-bool'
color.diff.plain:'color of context text::->color'
@@ -1758,6 +1924,7 @@ _git-config () {
color.pager:'feed colored output to pager::->bool:true'
color.showbranch:'color output of git show-branch::->color-bool'
color.status:'color output of git status::->color-bool'
+ color.status.branch:'color of the current branch::->color'
color.status.header:'color of header text::->color'
color.status.added:'color of added, but not yet committed, files::->color'
color.status.updated:'color of updated, but not yet committed, files::->color'
@@ -1765,24 +1932,41 @@ _git-config () {
color.status.untracked:'color of files not currently being tracked::->color'
color.status.nobranch:'color of no-branch warning::->color'
color.ui:'color output of capable git commands::->color-bool'
+ commit.cleanup:'default --cleanup option::->commit.cleanup:default'
commit.status:'include status information in commit message template::->bool:true'
commit.template:'template file for commit messages:template:_files'
+ 'diff.*.binary:make the diff driver treat files as binary::->bool:false'
+ 'diff.*.cachetextconv:make the diff driver cache the text conversion outputs::->bool:false'
+ 'diff.*.command:custom diff driver command::_path_commands'
+ 'diff.*.textconv:command to generate the text-converted version of a file::_path_commands'
+ 'diff.*.wordregex:regular expression that the diff driver should use to split words in a line:regular expression:->string'
+ 'diff.*.xfuncname:regular expression that the diff driver should use to recognize the hunk header:regular expression:->string'
+ diff.algorithm:'default diff algorithm::->diff.algorithm:default'
diff.autorefreshindex:'run git update-index --refresh before git diff::->bool:true'
+ diff.context:'default number of context lines::->int:3'
+ diff.dirstat:'comma separated list of --dirstat parameters specifying default behaviour:comma-separated list:->string:changes,noncumulative,3'
diff.external:'command to generate diff with:diff command:_path_commands'
diff.mnemonicprefix:'use mnemonic source and destination prefixes::->bool:false'
diff.noprefix:'strip source and destination prefixes::->bool:false'
diff.renameLimit:'number of files to consider when detecting copy/renames:rename limit:->int'
diff.renames:'try to detect renames::->diff.renames:true'
diff.ignoreSubmodules:'ignore submodules::->bool:false'
- diff.suppressBlankEmpty:'inbihit printing space before empty output lines::->bool:false'
+ diff.statGraphWidth:'width of the graph part in --stat output:width:->int'
+ diff.submodule:'output format for submodule differences::->diff.submodule:short'
+ diff.suppressBlankEmpty:'inhibit printing space before empty output lines::->bool:false'
diff.tool:'diff tool to use::__git_difftools'
'difftool.*.cmd:command to invoke for the diff tool::_path_commands'
'difftool.*.path:path to use for the diff tool:absolute diff tool path:_files -g "*(*)"'
difftool.prompt:'prompt before each invocation of the diff tool::->bool:true'
- diff.wordRegex:'regex used to determine what a word is when performing word-by-word diff:regex:->string'
+ diff.wordRegex:'regex used to determine what a word is when performing word-by-word diff:regular expression:->string'
diff.guitool:'diff tool with gui to use::__git_difftools'
fetch.unpackLimit:'maximum number of objects to unpack when fetching:unpack limit:->int'
+ fetch.recurseSubmodules:'recurse into submodules (as needed) when fetching::->fetch.recurseSubmodules:on-demand'
+ fetch.fsckObjects:'check all fetched objects::->bool:false'
+ 'filter.*.clean:command which is used to convert the content of a worktree file to a blob upon checkin::_path_commands'
+ 'filter.*.smudge:command which is used to convert the content of a blob object to a worktree file upon checkout::_path_commands'
format.attach:'use multipart/mixed attachments::->bool:false'
+ format.coverLetter:'control whether to generate a cover-letter when format-patch is invoked::->bool:false'
format.numbered:'use sequence numbers in patch subjects::->format.numbered:auto'
format.headers:'additional email headers to include in email patches:headers:->string'
format.to:'additional email recipients of patches::->string'
@@ -1795,7 +1979,7 @@ _git-config () {
format.signoff:'enable --signoff by default::->bool:false'
'gc.*.reflogexpire:grace period for git reflog expire::->days:90'
'gc.*.reflogexpireunreachable:grace period for git reflog expire for unreachable entries::->days:30'
- gc.aggressiveWindow:'window size used in delta compression algorithm:->int:250'
+ gc.aggressiveWindow:'window size used in delta compression algorithm::->int:250'
gc.auto:'minimum limit for packing loose objects with --auto::->int:6700'
gc.autopacklimit:'minimum limit for packing packs with --auto::->int:50'
gc.packrefs:'allow git gc to run git pack-refs::->gc.packrefs:true'
@@ -1822,8 +2006,9 @@ _git-config () {
'gitcvs.*.dbTableNamePrefix:database table name prefix:prefix:->string'
gitcvs.usecrlfattr:'use end-of-line conversion attributes::->bool:false'
gitcvs.allbinary:'treat all files from CVS as binary::->bool:false'
- gui.commitmsgwidth:'width of commit message window:width:->int:75'
- gui.diffcontext:'number of context lines used in diff window:context:->int:5'
+ gpg.program:'use program instead of "gpg" found on $PATH when making or verifying a PGP signature::_path_commands'
+ gui.commitmsgwidth:'width of commit message window:width::->int:75'
+ gui.diffcontext:'number of context lines used in diff window:context::->int:5'
gui.encoding:'encoding to use for displaying file contents::->encoding'
gui.matchtrackingbranch:'create branches that track remote branches::->bool:false'
gui.newbranchtemplate:'suggested name for new branches:template:->string'
@@ -1833,6 +2018,16 @@ _git-config () {
gui.fastcopyblame:'try harder during blame detection::->bool:false'
gui.copyblamethreshold:'threshold to use in blame location detection:threshold:->string'
gui.blamehistoryctx:'specify radius of history context in days for selected commit::->days'
+ 'guitool.*.argprompt:prompt for arguments:argument prompt:->string'
+ 'guitool.*.cmd:shell command line to execute::_path_commands'
+ 'guitool.*.confirm:show a confirmation dialog::->bool:false'
+ 'guitool.*.needsfile:require that a diff is selected for command to be available::->bool:false'
+ 'guitool.*.noconsole:suppress command output::->bool:false'
+ 'guitool.*.norescan:skip rescanning for changes to the working directory::->bool:false'
+ 'guitool.*.revprompt:request a single valid revision from the user, and set the "REVISION" environment variable::->string'
+ 'guitool.*.prompt:prompt to display:prompt:->string'
+ 'guitool.*.revunmerged:show only unmerged branches in revprompt::->bool:false'
+ 'guitool.*.title:title of prompt dialog:prompt title:->string'
guitool.cmd:'shell command line to execute::_path_commands'
guitool.needsfile:'require that a diff is selected for command to be available::->bool:false'
guitool.noconsole:'suppress command output::->bool:false'
@@ -1843,7 +2038,14 @@ _git-config () {
guitool.revunmerged:'show only unmerged branches in revprompt::->bool:false'
guitool.title:'title of prompt dialog:prompt title:->string'
guitool.prompt:'prompt to display:prompt:->string'
+ grep.extendedRegexp:'enable --extended-regexp option by default (ignored when grep.patternType is set)::->bool:false'
+ grep.lineNumber:'enable -n option by default::->bool:false'
+ grep.patternType:'default matching pattern type::->grep.patternType:default'
help.browser:'browser used to display help in web format::__git_browsers'
+ http.cookiefile:'file containing cookie lines which should be used in the Git http session::_files'
+ help.htmlpath:'location of HTML help::->help.htmlpath'
+ http.lowSpeedLimit:'limit controlling when to abort an HTTP transfer:speed limit:->int'
+ http.lowSpeedTime:'limit controlling when to abort an HTTP transfer:time limit (seconds):->int'
help.format:'default help format used by git help::->help.format'
help.autocorrect:'execute corrected mistyped commands::->bool:false'
http.proxy:'HTTP proxy to use:proxy:_urls'
@@ -1853,8 +2055,9 @@ _git-config () {
http.sslCertPasswordProtected:'prompt for a password for the SSL certificate::->bool:false'
http.sslCAInfo:'file containing CA certificates to verify against for HTTPS:CA certificates file:_files'
http.sslCAPath:'directory containing files with CA certificates to verify against for HTTPS:CA certificates directory:_directories'
- http.maxRequests:'how many HTTP requests to launch in parallel:maximum number of requests:->int:5'
- http.minSessions:'number of curl sessions to keep across requests:mininmum number of sessions:->int:1'
+ http.sslTry:'attempt to use AUTH SSL/TLS and encrypted data transfers when connecting via regular FTP protocol::->bool:false'
+ http.maxRequests:'how many HTTP requests to launch in parallel:maximum number of requests::->int:5'
+ http.minSessions:'number of curl sessions to keep across requests:minimum number of sessions::->int:1'
http.postBuffer:'maximum size of buffer used by smart HTTP transport when POSTing:maximum POST buffer size:->bytes:1m'
http.lowSpeedLimit:'lower limit for HTTP transfer-speed:low transfer-speed limit:->int'
http.lowSpeedTime:'duration for http.lowSpeedLimit:time:->int'
@@ -1882,16 +2085,22 @@ _git-config () {
instaweb.modulepath:'module path for the Apache HTTP-daemon for instaweb:module directory:_directories'
instaweb.port:'port to bind HTTP daemon to for instaweb::_ports'
interactive.singlekey:'accept one-letter input without Enter::->bool:false'
+ log.abbrevCommit:'make git-log, git-show, and git-whatchanged assume --abbrev-commit::->bool:false'
log.date:'default date-time mode::__git_date_formats'
log.decorate:'type of ref names to show::__git_log_decorate_formats'
+ log.mailmap:'make git-log, git-show, and git-whatchanged assume --use-mailmap:->bool:false'
log.showroot:'show initial commit as a diff against an empty tree::->bool:true'
mailinfo.scissors:'remove everything in body before a scissors line::->bool:false'
+ mailmap.blob:'like mailmap.file, but consider the value as a reference to a blob in the repository:blob reference:->string'
mailmap.file:'augmenting mailmap file:mailmap file:_files'
man.viewer:'man viewer to use for help in man format::__git_man_viewers'
'man.*.cmd:the command to invoke the specified man viewer:man command:_path_commands'
'man.*.path:path to use for the man viewer:absolute man tool path:_files -g "*(*)"'
+ merge.branchdesc:'populate the log message with the branch description text as well::->bool:false'
merge.conflictstyle:'style used for conflicted hunks::->merge.conflictstyle:merge'
- merge.log:'include summaries of merged commits in new merge commit messsages::->bool:false'
+ merge.defaultToUpstream:'merge the upstream branches configured for the current branch by default::->bool:false'
+ merge.ff:'allow fast-forward merges::->merge.ff:true'
+ merge.log:'include summaries of merged commits in new merge commit messages::->bool:false'
merge.renameLimit:'number of files to consider when detecting copy/renames during merge:limit:->int'
merge.renormalize:'use canonical representation of files during merge::->bool:false'
merge.stat:'print the diffstat between ORIG_HEAD and merge at end of merge::->bool:true'
@@ -1911,28 +2120,31 @@ _git-config () {
notes.rewrite.rebase:'copy notes from original to rewritten commit when running git rebase::->bool:true'
notes.rewriteMode:'what to do when target commit already has a not when rewriting::->notes.rewriteMode'
notes.rewriteRef:'refname to use when rewriting::->refname'
- pack.window:'size of window:window size:->int:10'
- pack.depth:'maximum delta depth:maximum delta depth:->int:50'
+ pack.window:'size of window:window size::->int:10'
+ pack.depth:'maximum delta depth:maximum delta depth::->int:50'
pack.windowMemory:'window size limit:maximum window size:->bytes:0'
pack.compression:'compression level::->compression:-1'
pack.deltaCacheSize:'maximum amount of memory for caching deltas:maximum delta cache size:->bytes:256m'
- pack.deltaCacheLimit:'maximum size of deltas:maximum delta size:->int:1000'
+ pack.deltaCacheLimit:'maximum size of deltas:maximum delta size::->int:1000'
pack.threads:'number of threads to use for searching for best delta matches:number of threads:->int'
pack.indexVersion:'default pack index version:index version:->string'
pack.packSizeLimit:'maximum size of packs:maximum size of packs:->bytes'
pull.octopus:'default merge strategy to use when pulling multiple branches::__git_merge_strategies'
+ pull.rebase:'rebase branches on top of the fetched branch, instead of merging::->bool:false'
pull.twohead:'default merge strategy to use when pulling a single branch::__git_merge_strategies'
- push.default:'action git push should take if no refspec is given::->push.default'
+ push.default:'action git push should take if no refspec is given::->push.default:matching'
rebase.stat:'show a diffstat of what changed upstream since last rebase::->bool:false'
rebase.autosquash:'autosquash by default::->bool:false'
receive.autogc:'run git gc --auto after receiving data::->bool:true'
receive.fsckObjects:'check all received objects::->bool:true'
+ receive.hiderefs:'string(s) receive-pack uses to decide which refs to omit from its initial advertisement:hidden refs:->string'
receive.unpackLimit:'maximum number of objects received for unpacking into loose objects:unpack limit:->int'
receive.denyDeletes:'deny a ref update that deletes a ref::->bool:false'
receive.denyDeleteCurrent:'deny a ref update that deletes currently checked out branch::->bool:false'
receive.denyCurrentBranch:'deny a ref update of currently checked out branch::->receive.denyCurrentBranch'
receive.denyNonFastForwards:'deny a ref update that is not a fast-forward::->bool:false'
receive.updateserverinfo:'run git update-server-info after receiving data::->bool:false'
+ 'remote.pushdefault:URL of a remote repository to pushto::__git_any_repositories'
'remote.*.url:URL of a remote repository::__git_any_repositories'
'remote.*.pushurl:push URL of a remote repository::__git_any_repositories'
'remote.*.proxy:URL of proxy to use for a remote repository::_urls'
@@ -1948,17 +2160,20 @@ _git-config () {
repack.usedeltabaseoffset:'use delta-base offsets::->bool:true'
rerere.autoupdate:'update index after resolution::->bool:false'
rerere.enabled:'record resolved conflicts::->bool'
+ sendemail.identity:'default identity::__git_sendemail_identities'
sendemail.smtpencryption:'encryption method to use::->sendemail.smtpencryption'
sendemail.aliasesfile:'file containing email aliases:email aliases file:_files'
sendemail.aliasfiletype:'format of aliasesfile::->sendemail.aliasfiletype'
+ sendemail.annotate:'review and edit each patch you are about to send::->bool:false'
sendemail.bcc:'value of Bcc\: header::_email_addresses'
sendemail.cc:'value of Cc\: header::_email_addresses'
sendemail.cccmd:'command to generate Cc\: header with:Cc\: command:_path_commands'
+ sendemail.toccmd:'command to generate To\: header with:To\: command:_path_commands'
sendemail.chainreplyto:'send each email as a reply to the previous one::->bool:false'
sendemail.confirm:'type of confirmation required before sending::->sendemail.confirm:auto'
sendemail.envelopesender:'envelope sender to send emails as::_email_addresses'
sendemail.from:'sender email address::_email_addresses'
- sendemail.multiedit:'edit all files at once::->bool:false'
+ sendemail.multiedit:'edit all files at once::->bool:true'
sendemail.signedoffbycc:'add Signed-off-by\: or Cc\: lines to Cc\: header::->bool:true'
sendemail.smtppass:'password to use for SMTP-AUTH:password:->string'
sendemail.suppresscc:'rules for suppressing Cc\:::->sendemail.suppresscc'
@@ -1966,15 +2181,18 @@ _git-config () {
sendemail.to:'value of To\: header::_email_addresses'
sendemail.smtpdomain:'FQDN to use for HELO/EHLO commands to SMTP server:smtp domain:_domains'
sendemail.smtpserver:'SMTP server to connect to:smtp host:_hosts'
+ sendemail.smtpserveroption:'specifies the outgoing SMTP server option to use:SMTP server option:->string'
sendemail.smtpserverport:'port to connect to SMTP server on:smtp port:_ports'
sendemail.smtpuser:'user to use for SMTP-AUTH:smtp user:_users'
sendemail.thread:'set In-Reply-To\: and References\: headers::->bool:true'
sendemail.validate:'perform sanity checks on patches::->bool:true'
'sendemail.*.aliasesfile:file containing email aliases::_files'
'sendemail.*.aliasfiletype:format of aliasesfile::->sendemail.aliasfiletype'
+ 'sendemail.*.annotate:review and edit each patch you are about to send::bool->false'
'sendemail.*.bcc:value of Bcc\: header::_email_addresses'
'sendemail.*.cc:value of Cc\: header::_email_addresses'
'sendemail.*.cccmd:command to generate Cc\: header with:Cc\: command:_path_commands'
+ 'sendemail.*.tocmd:command to generate To\: header with:To\: command:_path_commands'
'sendemail.*.chainreplyto:send each email as a reply to the previous one::->bool:false'
'sendemail.*.confirm:type of confirmation required before sending::->sendemail.confirm:auto'
'sendemail.*.envelopesender:envelope sender to send emails as::_email_addresses'
@@ -1987,15 +2205,21 @@ _git-config () {
'sendemail.*.to:value of To\: header::_email_addresses'
'sendemail.*.smtpdomain:FQDN to use for HELO/EHLO commands to SMTP server:smtp domain:_domains'
'sendemail.*.smtpserver:SMTP server to connect to:smtp host:_hosts'
+ 'sendemail.*.smtpserveroption:specifies the outgoing SMTP server option to use:SMTP server option:->string'
'sendemail.*.smtpserverport:port to connect to SMTP server on:smtp port:_ports'
'sendemail.*.smtpuser:user to use for SMTP-AUTH:smtp user:_users'
'sendemail.*.thread:set In-Reply-To\: and References\: headers::->bool:true'
'sendemail.*.validate:perform sanity checks on patches::->bool:true'
sendemail.assume8bitEncoding:'encoding to use for non-ASCII messages::__git_encodings'
+ sequence.editor:'text editor used by git rebase -i::_path_commands'
showbranch.default:'default set of branches for git show-branch::->branch'
status.relativePaths:'show paths relative to current directory::->bool:false'
status.showUntrackedFiles:'show untracked files::->status.showUntrackedFiles:normal'
status.submodulesummary:'include submodule summary::->bool:false'
+ status.branch:'show branch and tracking info in short format::->bool:false'
+ status.short:'use short format by default::->bool:false'
+ 'submodule.*.branch:remote branch name for a submodule:branch name:->string'
+ 'submodule.*.fetchRecurseSubmodules:fetch commits of submodules::->bool'
'submodule.*.path:path within project:submodule directory:_directories -qS \:'
'submodule.*.url:URL to update from::__git_any_repositories'
'submodule.*.update:update strategy to use::->submodule.update'
@@ -2009,6 +2233,7 @@ _git-config () {
svn.followparent:'follow parent commit::->bool:true'
svn.authorsFile:'default authors file:authors file:_files'
svn.quiet:'produce less output::->bool:false'
+ 'svn-remote.*.automkdirs:attempt to recreate empty directories that are in the Subversion repository::->bool:true'
'svn-remote.*.noMetadata:disable git-svn-id: lines at end of commits::->bool:false'
'svn-remote.*.useSvmProps:use remappings of URLs and UUIDs from mirrors::->bool:false'
'svn-remote.*.useSvnsyncProps:use remappings of URLs and UUIDs for the svnsync command::->bool:false'
@@ -2017,10 +2242,17 @@ _git-config () {
'svn-remote.*.ignore-paths:regular expression of paths to not check out:regular expression:->string'
'svn-remote.*.url:URL to connect to::_urls'
'svn-remote.*.fetch:fetch specification::__git_ref_specs'
+ 'svn-remote.*.pushurl:URL to push to::_urls'
'svn-remote.*.branches:branch mappings:branch mapping:->string'
'svn-remote.*.tags:tag mappings:tag mapping:->string'
+ 'tar.*.command:specify a shell command through which the tar output generated by git archive should be piped::_path_commands'
+ 'tar.*.remote:enable <format> for use by remote clients via git-upload-archive::->bool'
tar.umask:'umask to apply::->umask'
- transfer.unpackLimit:'default value for fetch.unpackLimit and receive.unpackLimit:unpack limit:->int:100'
+ transfer.unpackLimit:'default value for fetch.unpackLimit and receive.unpackLimit:unpack limit::->int:100'
+ transfer.fsckObjects:'check all objects::->bool:false'
+ transfer.hiderefs:'string(s) to decide which refs to omit from initial advertisements:hidden refs:->string'
+ uploadpack.hiderefs:'string(s) upload-pack uses to decide which refs to omit from its initial advertisement:hidden refs:->string'
+ uploadpack.allowtipsha1inwant:'allow upload-pack to accept a fetch request that asks for an object at the tip of a hidden ref::->bool:false'
'url.*.insteadOf:string to start URLs with:prefix:->string'
'url.*.pushInsteadOf:string to start URLs to push to with:prefix:->string'
user.email:'email address used for commits::_email_addresses'
@@ -2061,10 +2293,13 @@ _git-config () {
'color.grep.:git-grep-specific color option'
'color.interactive.:interaction-specific color option'
'color.status.:git-status-specific color option'
+ 'credential.*.:${${line[1]#credential.}%.*}-specific option'
+ 'filter.*.:${${line[1]#filter.}%.*} driver option'
+ 'diff.*.:${${line[1]#diff.}%.*} driver option'
'difftool.*.:${${line[1]#difftool.}%.*}-specific option'
'gc.*.:${${line[1]#gc.}%.*}-specific gc option'
'gitcvs.*.:gitcvs ${${line[1]#gitcvs.}%.*}-specific option'
- 'guitool.*.:${${line[1]#gc.}%.*}-specific option'
+ 'guitool.*.:${${line[1]#guitool.}%.*}-specific option'
'man.*.:${${line[1]#man.}%.*}-specific man option'
'merge.*.:${${line[1]#merge.}%.*}-specific merge option'
'mergetool.*.:${${line[1]#mergetool.}%.*}-specific option'
@@ -2110,6 +2345,9 @@ _git-config () {
(browser.)
__git_browsers -S . && ret=0
;;
+ (credential.)
+ _urls && ret=0
+ ;;
(difftool.)
__git_difftools -S . && ret=0
;;
@@ -2157,6 +2395,7 @@ _git-config () {
sections=(
advice:'options controlling advice'
core:'options controlling git core'
+ credential:'credential options'
add:'git add options'
alias:'command aliases'
am:'git am options'
@@ -2165,12 +2404,14 @@ _git-config () {
browser:'browser options'
clean:'git clean options'
color:'color options'
+ column:'column options'
commit:'git commit options'
diff:'diff options'
difftool:'difftools'
fetch:'git fetch options'
format:'format options'
gc:'git gc options'
+ gpg:'gpg options'
gitcvs:'git-cvs options'
gui:'git gui options'
guitool:'git gui tool options'
@@ -2204,6 +2445,7 @@ _git-config () {
submodule:'git submodule options'
tar:'git tar-tree options'
transfer:'options controlling transfers'
+ uploadpack:'git upload-pack options'
url:'URL prefixes'
user:'options controlling user identity'
web:'web options'
@@ -2330,6 +2572,22 @@ _git-config () {
always:"always $parts[2]" \
{auto,true,yes,on}:$parts[2] && ret=0
;;
+ (column)
+ __git_config_values -- "$current" "$parts[5]" \
+ always:'always show in columns' \
+ never:'never show in columns' \
+ auto:'show in columns if the output is to the terminal' \
+ column:'fill columns before rows (implies "always")' \
+ row:'fill rows before columns (implies "akways")' \
+ plain:'show in one column (implies "always")' && ret=0
+ ;;
+ (commit.cleanup)
+ __git_config_values -- "$current" "$parts[5]" \
+ strip:'remove both whitespace and commentary lines' \
+ whitespace:'remove leading and trailing whitespace lines' \
+ verbatim:'no not change the commit message at all' \
+ default:'act as '\''strip'\'' if the message is to be edited and as '\''whitespace'\'' otherwise' && ret=0
+ ;;
(compression)
__git_compression_levels && ret=0
;;
@@ -2337,6 +2595,11 @@ _git-config () {
__git_config_booleans "$current" "$parts[5]" "$parts[2]" \
input:'convert CRLFs on input only' && ret=0
;;
+ (core.checkstat)
+ __git_config_values -- "$current" "$parts[5]" \
+ default:'check all fields' \
+ minimal:'check fewer fields' && ret=0
+ ;;
(core.createObject)
__git_config_values -- "$current" "$parts[5]" \
rename:'rename source objects' \
@@ -2378,10 +2641,23 @@ _git-config () {
__git_guard_number 'number of days'
fi
;;
+ (diff.algorithm)
+ __git_config_values -- "$current" "$parts[5]" \
+ default:'basic greedy diff algorithm' \
+ myers:'basic greedy diff algorithm' \
+ minimal:'spend extra time to make sure the smallest possible diff is produced' \
+ patience:'generate diffs with patience algorithm' \
+ histogram:'generate diffs with histogram algorithm' && ret=0
+ ;;
(diff.renames)
__git_config_booleans "$current" "$parts[5]" "$parts[2]" \
{copies,copy}:'try to detect both renames and copies' && ret=0
;;
+ (diff.submodule)
+ __git_config_values -- "$current" "$parts[5]" \
+ short:'show pairs of commit name' \
+ log:'list commits like git submodule does' && ret=0
+ ;;
(encoding)
__git_encodings && ret=0
;;
@@ -2391,6 +2667,10 @@ _git-config () {
crlf:'use CR+LF' \
native:'use line ending of platform' && ret=0
;;
+ (fetch.recurseSubmodules)
+ __git_config_booleans "$current" "$parts[5]" "$parts[2]" \
+ on-demand:'only when submodule reference in superproject is updated' && ret=0
+ ;;
(format.numbered)
__git_config_booleans "$current" "$parts[5]" "$parts[2]" \
auto:'use sequence numbers if more than one patch' && ret=0
@@ -2411,12 +2691,25 @@ _git-config () {
SQLite:'use the SQLite database driver' \
Pg:'use the Pg database driver' && ret=0
;;
+ (grep.patternType)
+ __git_config_values -- "$current" "$parts[5]" \
+ basic:'use --basic-regexp' \
+ default:'use default' \
+ extended:'use --extended-regexp' \
+ fixed:'use --fixed-strings' \
+ perl:'use --perl-regexp' && ret=0
+ ;;
(help.format)
__git_config_values -- "$current" "$parts[5]" \
man:'use man' \
info:'use info' \
{web,html}:'use HTML' && ret=0
;;
+ (help.htmlpath)
+ _alternative \
+ 'path::_files -/' \
+ 'url::_urls' && ret=0
+ ;;
(imap.authMethod)
__git_config_values -- "$current" "$parts[5]" \
CRAM-MD5:'use CRAM-MD5' && ret=0
@@ -2435,11 +2728,15 @@ _git-config () {
merge:'use standard merge style' \
diff3:'use diff3 style' && ret=0
;;
+ (merge.ff)
+ __git_config_booleans "$current" "$parts[5]" "$parts[2]" \
+ only:'only allow fast-forward merges (equivalent to --ff-only)' && ret=0
+ ;;
(merge.verbosity)
__git_config_values -t verbosity-levels -l 'verbosity level' -- "$current" "$parts[5]" \
- 0:'only final error message if conflicts were detected'
- 1:'conflicts'
- 2:'conflicts and file changes'
+ 0:'only final error message if conflicts were detected' \
+ 1:'conflicts' \
+ 2:'conflicts and file changes' \
5:'debugging information' && ret=0
;;
(notes.rewriteMode)
@@ -2455,7 +2752,8 @@ _git-config () {
__git_config_values -- "$current" "$parts[5]" \
nothing:'do not push anything' \
matching:'push all matching branches' \
- tracking:'push current branch to its upstream branch' \
+ upstream:'push current branch to its upstream branch' \
+ simple:'like upstream, but only if local and remote names are the same' \
current:'push current branch to branch of same name' && ret=0
;;
(receive.denyCurrentBranch)
@@ -2513,7 +2811,7 @@ _git-config () {
(umask)
_alternative \
'values:value:(user)' \
- 'umasks::__git_guard_number umask' && ret=0
+ 'umasks: :__git_guard_number umask' && ret=0
;;
esac
;;
@@ -2548,7 +2846,9 @@ _git-fast-export () {
'-C-[detect copies as well as renames with given scope]: :__git_guard_number size' \
'--export-marks=[dump internal marks table when complete]: :_files' \
'--import-marks=[load marks before processing input]: :_files' \
+ '--import-marks-if-exists=[silently skip if files does not exist]: :_files' \
'--fake-missing-tagger=[fake a tagger when tags lack them]' \
+ '--use-done-feature[start with a "feature done" stanza, and terminate with a "done" command]' \
'--no-data[do not output blocb objects, instead referring to them via their SHA-1 hash]' \
'--full-tree[output full tree for each commit]' \
'*: :__git_commit_ranges'
@@ -2557,9 +2857,11 @@ _git-fast-export () {
(( $+functions[_git-fast-import] )) ||
_git-fast-import () {
_arguments -S -A '-*' \
+ '--cat-blob-fd=-[write responses to cat-blob and ls queries to <fd> instead of stdout]:file descriptor' \
'--date-format=-[type of dates used in input]:format:((raw\:"native Git format"
rfc2822\:"standard email format from RFC 2822"
now\:"use current time and timezone"' \
+ '--done[terminate with error if there is no "done" command at the end of the stream]' \
'--force[force updating modified existing branches]' \
'--max-pack-size=-[maximum size of each packfile]: :__git_guard_bytes' \
'--big-file-threshold=-[maximum size of blob to create deltas for]: :__git_guard_bytes' \
@@ -2601,6 +2903,7 @@ _git-mergetool () {
# TODO: Only complete files with merge conflicts.
_arguments -S -A '-*' \
'(-t --tool)'{-t,--tool=}'[merge resolution program to use]: :__git_mergetools' \
+ '--tool-help[print a list of merge tools that may be used with "--tool"]' \
'(-y --no-prompt --prompt)'{-y,--no-prompt}'[do not prompt before invocation of merge resolution program]' \
'(-y --no-prompt)--prompt[prompt before invocation of merge resolution program]' \
'*:conflicted file:_files'
@@ -2668,7 +2971,7 @@ _git-reflog () {
'--expire-unreachable=-[prune entries older than given time and unreachable]: :__git_datetimes' \
'--all[prune all refs]' \
'--updateref[update ref with SHA-1 of top reflog entry after expiring or deleting]' \
- '--rewrite[adjust reflog entries to ensure old SHA-1 points to new SHA-1 of previous entry after expring or deleting]' \
+ '--rewrite[adjust reflog entries to ensure old SHA-1 points to new SHA-1 of previous entry after expiring or deleting]' \
'--verbose[output additional information]' && ret=0
;;
(delete)
@@ -2676,7 +2979,7 @@ _git-reflog () {
_arguments -C -S \
'(-n --dry-run)'{-n,--dry-run}'[undocumented]' \
'--updateref[update ref with SHA-1 of top reflog entry after expiring or deleting]' \
- '--rewrite[adjust reflog entries to ensure old SHA-1 points to new SHA-1 of previous entry after expring or deleting]' \
+ '--rewrite[adjust reflog entries to ensure old SHA-1 points to new SHA-1 of previous entry after expiring or deleting]' \
'*:: :->reflog-entry' && ret=0
case $state in
@@ -2700,10 +3003,9 @@ _git-reflog () {
(( $+functions[_git-relink] )) ||
_git-relink () {
- # TODO: --help is undocumented.
_arguments \
'--safe[stop if two objects with the same hash exist but have different sizes]' \
- '--help[display help]' \
+ '(-)'{-h,--help}'[display usage information]' \
': :_directories' \
': :_directories' \
'*: :_directories'
@@ -2856,31 +3158,33 @@ _git-blame () {
'-l[show long rev]' \
'-t[show raw timestamp]' \
'-S[use revs from revs-file]:revs-file:_files' \
- '--reverse[walk histor forward instead of backward]' \
+ '--reverse[walk history forward instead of backward]' \
'(-p --porcelain)'{-p,--porcelain}'[show results designed for machine processing]' \
+ '--line-porcelain[show results designed for machine processing but show commit information for every line]' \
'--incremental[show results incrementally for machine processing]' \
'--contents[annotate against the given file if no rev is specified]: :_files' \
'(-h --help)'{-h,--help}'[show help message]' \
'-c[use same output format as git annotate]' \
'--score-debug[output debugging information relating to -C and -M line movement]' \
+ '(-e --show-email)'{-e,--show-email}'[show the author email instead of the author name]' \
'(-f --show-name)'{-f,--show-name}'[show the filename of the original commit]' \
'(-n --show-number)'{-n,--show-number}'[show the line number in the original commit]' \
'-s[suppress author name and timestamp]' \
'-w[ignore whitespace when finding lines]' \
$revision_options \
- ': :__git_cached_files' \
- ':: :__git_revisions' && ret=0
+ ':: :__git_revisions' \
+ ': :__git_cached_files' && ret=0
case $state in
(line-range)
if compset -P '([[:digit:]]#|/[^/]#(\\?[^/]#)#/),'; then
_alternative \
- 'line-numbers::__git_guard_number "line number"' \
+ 'line-numbers: :__git_guard_number "line number"' \
'regexes::_guard "(/[^/]#(\\?[^/]#)#(/|)|)" regex' \
'offsets::_guard "([+-][[:digit:]]#|)" "line offset"' && ret=0
else
_alternative \
- 'line-numbers::__git_guard_number "line number"' \
+ 'line-numbers: :__git_guard_number "line number"' \
'regexes::_guard "(/[^/]#(\\?[^/]#)#(/|)|)" regex' && ret=0
fi
;;
@@ -2903,17 +3207,22 @@ _git-cherry () {
(( $+functions[_git-count-objects] )) ||
_git-count-objects () {
_arguments \
- '(-v --verbose)'{-v,--verbose}'[also report number of in-pack objects and objects that can be removed]'
+ '(-v --verbose)'{-v,--verbose}'[also report number of in-pack objects and objects that can be removed]' \
+ {-H,--human-readable}'[Print sizes in human readable format]'
}
(( $+functions[_git-difftool] )) ||
_git-difftool () {
# TODO: Is this fine, or do we need to modify the context or similar?
_git-diff \
+ '--dir-diff[diff a whole tree by prepare a temporary copy]' \
'(-y --no-prompt --prompt)'{-y,--no-prompt}'[do not prompt before invocation of diff tool]' \
'(-y --no-prompt)--prompt[prompt before invocation of diff tool]' \
'(-t --tool -x --extcmd)'{-t,--tool=-}'[merge resolution program to use]: :__git_difftools' \
'(-t --tool -x --extcmd)'{-x,--extcmd=-}'[custom diff command to use]: :_path_commands' \
+ '--tool-help[print a list of diff tools that may be used with --tool]' \
+ '(--symlinks)--no-symlinks[make copies of instead of symlinks to the working tree]' \
+ '(---no-symlinks)--symlinks[make symlinks to instead of copies of the working tree]' \
'(-g --gui)'{-g,--gui}'[use diff.guitool instead of diff.tool]'
}
@@ -2922,6 +3231,8 @@ _git-fsck () {
# TODO: -v is undocumented.
_arguments -w -S -s \
'--unreachable[show objects that are unreferenced in the object database]' \
+ '(--dangling --no-dangling)--dangling[print dangling objects (default)]' \
+ '(--dangling --no-dangling)--no-dangling[do not print dangling objects]' \
'--root[show root nodes]' \
'--tags[show tags]' \
'--cache[consider objects recorded in the index as head nodes for reachability traces]' \
@@ -2941,10 +3252,11 @@ _git-get-tar-commit-id () {
(( $+functions[_git-help] )) ||
_git-help () {
_arguments -w -S -s \
- '( -i --info -m --man -w --web)'{-a,--all}'[show all available commands]' \
- '(-a --all -m --man -w --web)'{-i,--info}'[show all available commands]' \
- '(-a --all -i --info -w --web)'{-m,--man}'[show all available commands]' \
- '(-a --all -i --info -m --man )'{-w,--web}'[show all available commands]' \
+ '( -g --guides -i --info -m --man -w --web)'{-a,--all}'[show all available commands]' \
+ '(-a --all -g --guides -m --man -w --web)'{-i,--info}'[show all available commands]' \
+ '(-a --all -g --guides -i --info -w --web)'{-m,--man}'[show all available commands]' \
+ '(-a --all -g --guides -i --info -m --man )'{-w,--web}'[show all available commands]' \
+ '(-g --guides)'{-g,--guides}'[prints a list of useful guides on the standard output]' \
': :_git_commands'
}
@@ -3005,7 +3317,8 @@ _git-rerere () {
'clear[reset metadata used by rerere]' \
'forget[resets metadata used by rerere for specific conflict]: :__git_cached_files' \
'diff[output diffs for the current state of the resolution]' \
- 'status[like diff, but only output filesames]' \
+ 'status[print paths with conflicts whose merge resolution rerere will record]' \
+ 'remaining[print paths with conflicts that have not been autoresolved by rerere]' \
'gc[prune old records of conflicted merges]' && ret=0
;;
esac
@@ -3063,6 +3376,7 @@ _git-rev-parse () {
'( --symbolic-full-name)--symbolic[output in a format as true to input as possible]' \
'(--symbolic )--symbolic-full-name[same as --symbolic, but omit non-ref inputs]' \
'--abbrev-ref=-[a non-ambiguous short name of object]::mode:(strict loose)' \
+ '--disambiguate=-[show every object whose name begins with the given prefix]:prefix' \
'--all[show all refs found in refs/]' \
'--branches=-[show branch refs found in refs/heads/]::shell glob pattern' \
'--tags=-[show tag refs found in refs/tags/]::shell glob pattern' \
@@ -3078,6 +3392,7 @@ _git-rev-parse () {
'(--revs-only --no-revs --flags --no-flags --verify)--short=-[show only shorter unique name]:: :__git_guard_number length' \
'(--since --after)'{--since=-,--after=-}'[show --max-age= parameter corresponding given date string]:datestring' \
'(--until --before)'{--until=-,--before=-}'[show --min-age= parameter corresponding given date string]:datestring' \
+ '--resolve-git-dir[check if <path> is a valid repository or gitfile and print location]:git dir:_files -/' \
'*: :__git_objects' && ret=0
fi
@@ -3105,7 +3420,7 @@ _git-show-branch () {
'(--no-name )--sha1-name[name commits with unique prefix of object names]' \
'--topics[show only commits that are NOT on the first branch given]' \
'( --no-color)--color[color status sign of commits]:: :__git_color_whens' \
- '(--color )--no-color[do not color statis sign of commits]' \
+ '(--color )--no-color[do not color status sign of commits]' \
'*: :__git_revisions' \
- reflogs \
'(-g --reflog)'{-g,--reflog=}'[show reflog entries for given ref]:: :->limit-and-base' \
@@ -3115,7 +3430,7 @@ _git-show-branch () {
(limit-and-base)
if compset -P '[[:digit:]]##,'; then
_alternative \
- 'counts::__git_guard_number count' \
+ 'counts: :__git_guard_number count' \
'dates::__git_datetimes' && ret=0
else
__git_guard_number limit
@@ -3128,9 +3443,8 @@ _git-show-branch () {
(( $+functions[_git-verify-tag] )) ||
_git-verify-tag () {
- # TODO: -v and --verbose are undocumented.
_arguments -w -S -s \
- '(-v --verbose)'{-v,--verbose}'[output additional information]' \
+ '(-v --verbose)'{-v,--verbose}'[print the contents of the tag object before validating it]' \
'*: :__git_tags'
}
@@ -3257,14 +3571,18 @@ _git-send-email () {
'--subject=[specify the initial subject of the email thread]:subject' \
'--to=[specify the primary recipient of the emails]: :_email_addresses' \
'--8bit-encoding=[encoding to use for non-ASCII messages]: :__git_encodings' \
+ '--compose-encoding=[encoding to use for compose messages]: :__git_encodings' \
'--envelope-sender[specify the envelope sender used to send the emails]: :_email_addresses' \
'--smtp-encryption=[specify encryption method to use]: :__git_sendemail_smtpencryption_values' \
'--smtp-domain=[specify FQDN used in HELO/EHLO]: :_domains' \
'--smtp-pass=[specify password to use for SMTP-AUTH]::password' \
'--smtp-server=[specify SMTP server to connect to]:smtp server:_hosts' \
'--smtp-server-port=[specify port to connect to SMTP server on]:smtp port:_ports' \
+ '--smtp-server-option=[specify the outgoing SMTP server option to use]:SMPT server option' \
'--smtp-user=[specify user to use for SMTP-AUTH]:smtp user:_users' \
+ '--smtp-debug=[enable or disable debug output]:smtp debug:((0\:"disable" 1\:"enable"))' \
'--cc-cmd=[specify command to generate Cc\: header with]:Cc\: command:_path_commands' \
+ '--to-cmd=[specify command to generate To\: header with]:To\: command:_path_commands' \
'( --no-chain-reply-to)--chain-reply-to[send each email as a reply to previous one]' \
'(--chain-reply-to )--no-chain-reply-to[send all emails after first as replies to first one]' \
'--identity=[specify configuration identity]: :__git_sendemail_identities' \
@@ -3282,7 +3600,7 @@ _git-send-email () {
'--quiet[be less verbose]' \
'( --no-validate)--validate[perform sanity checks on patches]' \
'(--validate )--validate[do not perform sanity checks on patches]' \
- '--force[send emails even if safetiy checks would prevent it]' \
+ '--force[send emails even if safety checks would prevent it]' \
'*: :_files'
}
@@ -3558,8 +3876,6 @@ _git-apply () {
'--unidiff-zero[disable unified-diff-context check]' \
'--apply[apply patches that would otherwise not be applied]' \
'--no-add[ignore additions made by the patch]' \
- '*--exclude=[skip files matching specified pattern]:pattern' \
- '*--include=[include files matching specified pattern]:pattern' \
'--inaccurate-eof[work around missing-new-line-at-EOF bugs]' \
'(-v --verbose)'{-v,--verbose}'[display progress on stderr]' \
'--recount[do not trust line counts in hunk headers]' \
@@ -3749,9 +4065,10 @@ _git-prune-packed () {
(( $+functions[_git-read-tree] )) ||
_git-read-tree () {
- local trivial_opt= aggressive_opt=
+ local trivial_opt= aggressive_opt= dryrun_opt=
if (( words[(I)-m] )); then
+ dryrun_opt='--dry-run[report if a merge would fail without touching the index or the working tree]'
trivial_opt='--trivial[restrict three-way merge to only happen if no file-level merging is required]'
aggressive_opt='--aggressive[try harder to resolve merge conflicts]'
fi
@@ -3775,12 +4092,14 @@ _git-read-tree () {
'(-m --prefix)--reset[perform a merge, not just a read, ignoring unmerged entries]' \
'(-m --reset 2 3)--prefix=-[read the contents of specified tree-ish under specified directory]:prefix:_directories -r ""' \
$ui_opts \
+ $dryrun_opt \
'-v[display progress on standard error]' \
$trivial_opt \
$aggressive_opt \
$exclude_per_directory_opt \
'--index-output=[write index in the named file instead of $GIT_INDEX_FILE]: :_files' \
'--no-sparse-checkout[display sparse checkout support]' \
+ '--empty[instead of reading tree object(s) into the index, just empty it]' \
'1:first tree-ish to be read/merged:__git_tree_ishs' \
'2::second tree-ish to be read/merged:__git_tree_ishs' \
'3::third tree-ish to be read/merged:__git_tree_ishs'
@@ -3789,8 +4108,10 @@ _git-read-tree () {
(( $+functions[_git-symbolic-ref] )) ||
_git-symbolic-ref () {
_arguments -w -S -s \
+ '(-d --delete)'{-d,--delete}'[delete symbolic ref]' \
'(-q --quiet)'{-q,--quiet}'[do not issue error if specified name is not a symbolic ref]' \
- '-m[update reflog for specified name with specied reason]:reason for update' \
+ '--short[shorten the ref name (eg. refs/heads/master -> master)]' \
+ '-m[update reflog for specified name with specified reason]:reason for update' \
':symbolic reference:__git_heads' \
':: :__git_references'
}
@@ -3845,7 +4166,7 @@ _git-update-index () {
(( $+functions[_git-update-ref] )) ||
_git-update-ref () {
_arguments -w -S -s \
- '-m[update reflog for specified name with specied reason]:reason for update' \
+ '-m[update reflog for specified name with specified reason]:reason for update' \
'(:)-d[delete given reference after verifying its value]:symbolic reference:__git_revisions:old reference:__git_revisions' \
'--no-deref[overwrite ref itself, not what it points to]' \
':symbolic reference:__git_revisions' \
@@ -3871,8 +4192,8 @@ _git-cat-file () {
'(- 1)-e[exit with zero status if object exists]' \
'(- 1)-p[pretty-print given object]' \
'(- 1)--textconv[show content as transformed by a textconv filter]' \
- '(- :)--batch[print SHA1, type, size, and contents of each object provided on stdin]' \
- '(- :)--batch-check[print SHA1, type, and size of each object provided on stdin]' \
+ '(- :)--batch=-[print SHA1, type, size and contents (or in <format>) of objects given on stdin]:format' \
+ '(- :)--batch-check=-[print SHA1, type and size (or in <format>) of objects given on stdin]:format' \
'(-):object type:(blob commit tag tree)' \
': :__git_objects'
}
@@ -4015,6 +4336,8 @@ _git-ls-remote () {
'(-h --heads)'{-h,--heads}'[show only refs under refs/heads]' \
'(-t --tags)'{-t,--tags}'[show only refs under refs/tags]' \
'(-u --upload-pack)'{-u,--upload-pack=-}'[specify path to git-upload-pack on remote side]:remote path' \
+ '--exit-code[exit with status 2 when no matching refs are found in the remote repository]' \
+ '--get-url[expand the URL of the given repository taking into account any "url.<base>.insteadOf" config setting]' \
': :__git_any_repositories' \
'*: :__git_references'
}
@@ -4051,6 +4374,7 @@ _git-merge-base () {
_arguments -w -S -s \
'(-a --all)'{-a,--all}'[display all common ancestors]' \
'--octopus[compute best common ancestors of all supplied commits]' \
+ '--is-ancestor[tell if A is ancestor of B (by exit status)]' \
'(-)--independent[display minimal subset of supplied commits with same ancestors]' \
': :__git_commits' \
'*: :__git_commits'
@@ -4092,7 +4416,7 @@ _git-rev-list () {
'--timestamp[print raw commit timestamp]' \
'( --bisect-vars --bisect-all)--bisect[show only middlemost commit object]' \
'(--bisect)--bisect-vars[same as --bisect, displaying shell-evalable code]' \
- '(--bisect)--bisect-all[display all commit objects beteen included and excluded commits]' \
+ '(--bisect)--bisect-all[display all commit objects between included and excluded commits]' \
'*:: :->commit-or-path' && ret=0
case $state in
@@ -4122,7 +4446,7 @@ _git-show-ref () {
- list \
'(-h --head)'{-h,--head}'[show HEAD reference]' \
'--tags[show only refs/tags]' \
- '--heads[show only refs/heads]' \
+ '--heads[show only HEAD and refs under refs/heads]' \
'(-d --dereference)'{-d,--dereference}'[dereference tags into object IDs as well]' \
'(-s --hash)'{-s+,--hash=-}'[only show the SHA-1 hash, not the reference name]:: :__git_guard_number length' \
'--verify[enable stricter reference checking]' \
@@ -4167,6 +4491,7 @@ _git-daemon () {
# TODO: --interpolated-path should complete %H, %CH, %IP, %P, and %D.
_arguments -S \
'--strict-paths[match paths exactly]' \
+ '--access-hook=-[allow an external tool to accept or decline service]:path:_directories' \
'--base-path=-[remap all the path requests as relative to the given path]:path:_directories' \
'--base-path-relaxed[allow lookup of base path witout prefix]' \
'--interpolated-path=-[dynamically construct alternate paths]:path:_directories' \
@@ -4189,6 +4514,8 @@ _git-daemon () {
'--disable=-[disable site-wide service]: :__git_daemon_service' \
'--allow-override[allow overriding site-wide service]: :__git_daemon_service' \
'--forbid-override[forbid overriding site-wide service]: :__git_daemon_service' \
+ '(--no-informative-errors)--informative-errors[report more verbose errors to the client]' \
+ '(--informative-errors)--no-informative-errors[report all errors as "access denied" to the client]' \
'*:repository:_directories'
}
@@ -4355,7 +4682,9 @@ _git-check-attr () {
fi
_arguments -C \
+ {-a,--all}'[list all attributes that are associated with the specified paths]' \
'--stdin[read file names from stdin instead of from command line]' \
+ '--cached[consider .gitattributes in the index only, ignoring the working tree.]' \
$z_opt \
'(-)--[interpret preceding arguments as attributes and following arguments as path names]' \
'*:: :->attribute-or-file' && ret=0
@@ -4391,7 +4720,10 @@ _git-check-attr () {
_git-check-ref-format () {
_arguments \
'-h[display usage information]' \
- '--print[display canonicalized name of hypothetical reference of given name]' \
+ '(--no-allow-onelevel)--allow-onelevel[accept one-level refnames]' \
+ '(--allow-onelevel)--no-allow-onelevel[do not accept one-level refnames]' \
+ '--refspec-pattern[interpret <refname> as a reference name pattern for a refspec]' \
+ '--normalize[Normalize refname by removing leading slashes]' \
'--branch[expand previous branch syntax]' \
': :__git_references'
}
@@ -4446,7 +4778,8 @@ _git-patch-id () {
(( $+functions[_git-stripspace] )) ||
_git-stripspace () {
_arguments \
- '(-s --strip-comments)'{-s,--strip-comments}'[also strip lines starting with #]'
+ '(-s --strip-comments)'{-s,--strip-comments}'[also strip lines starting with #]' \
+ '(-c --comment-lines)'{-c,--comment-lines}'[prepend comment character and blank to each line]'
}
# INTERNAL GIT COMPLETION FUNCTIONS
@@ -4576,7 +4909,7 @@ _git_commands () {
notes:'add or inspect object notes'
pull:'fetch from and merge with another repository or local branch'
push:'update remote refs along with associated objects'
- rebase:'fasforward-port local commits to the updated upstream head'
+ rebase:'forward-port local commits to the updated upstream head'
reset:'reset current HEAD to specified state'
revert:'revert existing commits'
rm:'remove files from the working tree and from the index'
@@ -4592,7 +4925,7 @@ _git_commands () {
config:'get and set repository or global options'
fast-export:'data exporter'
fast-import:'import information into git directly'
- filter-branch:'rewrite branchers'
+ filter-branch:'rewrite branches'
mergetool:'run merge conflict resolution tools to resolve merge conflicts'
pack-refs:'pack heads and tags for efficient repository access'
prune:'prune all unreachable objects from the object database'
@@ -4692,6 +5025,8 @@ _git_commands () {
local -a plumbing_internal_helper_commands
plumbing_internal_helper_commands=(
check-attr:'display gitattributes information'
+ check-ignore:'debug gitignore/exclude files'
+ check-mailmap:'show canonical names and email addresses of contacts'
check-ref-format:'ensure that a reference name is well formed'
fmt-merge-msg:'produce merge commit message'
mailinfo:'extract patch and authorship from a single email message'
@@ -4757,7 +5092,13 @@ __git_aliases () {
(( $+functions[__git_extract_aliases] )) ||
__git_extract_aliases () {
- aliases=(${^${${(0)"$(_call_program aliases "git config -z --get-regexp '^alias.'")"}#alias.}/$'\n'/:alias for \'}\')
+ local -a tmp
+ tmp=(${${(0)"$(_call_program aliases "git config -z --get-regexp '^alias.'")"}#alias.})
+ if (( ${#tmp} > 0 )); then
+ aliases=(${^tmp/$'\n'/:alias for \'}\')
+ else
+ aliases=()
+ fi
}
(( $+functions[__git_date_formats] )) ||
@@ -4863,7 +5204,7 @@ __git_ignore_submodules_whens () {
whens=(
none:'submodule is dirty when it contains untracked or modified files'
- untracked:'submodule is dirty when it contains untracket files'
+ untracked:'submodule is dirty when it contains untracked files'
dirty:'ignore all changes to submodules, showing only changes to commits stored in superproject'
all:'ignore all changes to submodules (default)')
@@ -5070,6 +5411,17 @@ __git_remote_branch_names () {
_wanted remote-branch-names expl 'remote branch name' compadd $* - $branch_names
}
+(( $+functions[__git_remote_branch_names_noprefix] )) ||
+__git_remote_branch_names_noprefix () {
+ local expl
+ declare -a heads
+
+ branch_names=(${${${(f)"$(_call_program remote-branch-refs-noprefix git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}##*/}:#HEAD})
+ __git_command_successful $pipestatus || return 1
+
+ _wanted remote-branch-names-noprefix expl 'remote branch name' compadd $* - $branch_names
+}
+
(( $+functions[__git_commits] )) ||
__git_commits () {
# TODO: deal with things that __git_heads and __git_tags has in common (i.e.,
@@ -5267,15 +5619,6 @@ __git_remote_references () {
__git_references
}
-(( $+functions[__git_note_references] )) ||
-__git_local_references () {
- local references expl
-
- references=(${${(M)${${(f)"$(_call_program references git ls-remote ./. 2>/dev/null)"}#*$'\t'}:#refs/notes/*}#refs/notes/})
- __git_command_successful $pipestatus || return 1
-
- _wanted references expl reference compadd - $references
-}
(( $+functions[__git_notes_refs] )) ||
__git_notes_refs () {
local expl
@@ -5339,7 +5682,7 @@ __git_files () {
# TODO: --directory should probably be added to $opts when --others is given.
local pref=$gitcdup$gitprefix$PREFIX
- files=(${(0)"$(_call_program files git ls-files -z --exclude-standard $opts -- ${pref:+$pref\*} 2>/dev/null)"})
+ files=(${(0)"$(_call_program files git ls-files -z --exclude-standard $opts -- ${pref:+$pref\\\*} 2>/dev/null)"})
__git_command_successful $pipestatus || return
# _wanted $tag expl $description _files -g '{'${(j:,:)files}'}' $compadd_opts -
@@ -5559,19 +5902,29 @@ __git_setup_log_options () {
'(- *)-h[display help]'
'( --no-decorate)--decorate=-[print out ref names of any commits that are shown]: :__git_log_decorate_formats'
'(--decorate )--no-decorate[do not print out ref names of any commits that are shown]'
+ '( --no-follow)--follow[follow renames]'
+ '(--follow )--no-follow[do not follow renames]'
'--source[show which ref each commit is reached from]')
}
(( $+functions[__git_setup_diff_options] )) ||
__git_setup_diff_options () {
- local diff_types='(-p -u --patch -U --unified --raw --patch-with-raw --stat --numstat --shortstat --dirstat --dirstat-by-file --summary --patch-with-stat --name-only --name-status --cumulative)'
+ local diff_types='(-p -u --patch -U --unified --raw --patch-with-raw --stat --numstat --shortstat --dirstat --dirstat-by-file --summary --patch-with-stat --name-only --name-status --cumulative -s --no-patch)'
diff_options=(
$diff_types{-p,-u,--patch}'[generate diff in patch format]'
$diff_types{-U,--unified=}'[generate diff with given lines of context]: :__git_guard_number lines'
$diff_types'--raw[generate default raw diff output]'
$diff_types'--patch-with-raw[generate patch but also keep the default raw diff output]'
- '--patience[generate diffs with patience algorithm]'
+ $diff_types{-s,--no-patch}'[suppress diff output]'
+ '(--minimal --patience --histogram --diff-algorithm)--minimal[spend extra time to make sure the smallest possible diff is producedm]'
+ '(--minimal --patience --histogram --diff-algorithm)--patience[generate diffs with patience algorithm]'
+ '(--minimal --patience --histogram --diff-algorithm)--histogram[generate diffs with histogram algorithm]'
+ '(--minimal --patience --histogram --diff-algorithm)--diff-algorithm=[choose a diff algorithm]:diff algorithm:((default\:"basic greedy diff algorithm"
+ myers\:"basic greedy diff algorithm"
+ minimal\:"spend extra time to make sure the smallest possible diff is produced"
+ patience\:"generate diffs with patience algorithm"
+ histogram\:"generate diffs with histogram algorithm"))'
$diff_types'--stat=-[generate diffstat instead of patch]:: :__git_guard_diff-stat-width'
$diff_types'--numstat[generate more machine-friendly diffstat]'
$diff_types'--shortstat[generate summary diffstat]'
@@ -5583,7 +5936,7 @@ __git_setup_diff_options () {
$diff_types'--name-only[show only names of changed files]'
$diff_types'--name-status[show only names and status of changed files]'
'--submodule=-[select output format for submodule differences]::format:((short\:"show pairs of commit names"
- log\:"list commits like git submodule does (default)"))'
+ log\:"list commits like git submodule does"))'
'( --no-color --color-words)--color=-[show colored diff]:: :__git_color_whens'
'(--color --color-words)--no-color[turn off colored diff]'
'--word-diff=-[show word diff]::mode:((color\:"highlight changed words using color"
@@ -5597,16 +5950,15 @@ __git_setup_diff_options () {
'--full-index[show full object name of pre- and post-image blob]'
'(--full-index)--binary[in addition to --full-index, output binary diffs for git-apply]'
'--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length'
- # TODO: --break-rewrites is undocumented.
'(-B --break-rewrites)'{-B-,--break-rewrites=-}'[break complete rewrite changes into pairs of given size]:: :__git_guard_number size'
- # TODO: --detect-renames is undocumented.
- '(-M --detect-renames)'{-M-,--detect-renames=-}'[detect renames with given scope]:: :__git_guard_number size'
- # TODO: --detect-copies is undocumented.
- '(-C --detect-copies)'{-C-,--detect-copies=-}'[detect copies as well as renames with given scope]:: :__git_guard_number size'
+ '(-M --find-renames)'{-M-,--find-renames=-}'[Detect renames with given scope]:: :__git_guard_number size'
+ '(-C --find-copies)'{-C-,--find-copies=-}'[detect copies as well as renames with given scope]:: :__git_guard_number size'
'--find-copies-harder[try harder to find copies]'
+ '(-D --irreversible-delete)'{-D,--irreversible-delete}'[omit the preimage for deletes]'
'-l-[limit number of rename/copy targets to run]: :__git_guard_number'
'--diff-filter=-[select certain kinds of files for diff]: :_guard "[ACDMRTUXB*]#" kinds'
- '-S-[look for differences that contain the given string]:string'
+ '-S-[look for differences that add or remove the given string]:string'
+ '-G-[look for differences whose added or removed line matches the given regex]:pattern'
'--pickaxe-all[when -S finds a change, show all changes in that changeset]'
'--pickaxe-regex[treat argument of -S as regular expression]'
'-O-[output patch in the order of glob-pattern lines in given file]: :_files'
@@ -5616,11 +5968,14 @@ __git_setup_diff_options () {
'--ignore-space-at-eol[ignore changes in whitespace at end of line]'
'(-b --ignore-space-change -w --ignore-all-space)'{-b,--ignore-space-change}'[ignore changes in amount of white space]'
'(-b --ignore-space-change -w --ignore-all-space)'{-w,--ignore-all-space}'[ignore white space when comparing lines]'
+ '--ignore-blank-lines[do not show hunks that add or remove blank lines]'
'--inter-hunk-context=[combine hunks closer than n lines]:n'
'--exit-code[report exit code 1 if differences, 0 otherwise]'
'(--exit-code)--quiet[disable all output]'
'( --no-ext-diff)--ext-diff[allow external diff helper to be executed]'
'(--ext-diff )--no-ext-diff[disallow external diff helper to be executed]'
+ '(--textconv --no-textconv)--textconv[allow external text conversion filters to be run when comparing binary files]'
+ '(--textconv --no-textconv)--no-textconv[do not allow external text conversion filters to be run when comparing binary files]'
'--ignore-submodules[ignore changes to submodules]:: :__git_ignore_submodules_whens'
'(--no-prefix)--src-prefix=[use given prefix for source]:prefix'
'(--no-prefix)--dst-prefix=[use given prefix for destination]:prefix'
@@ -5631,18 +5986,7 @@ __git_setup_diff_options () {
'(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)'{-3,--theirs}'[diff against "their branch" version]'
'(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)-0[omit diff output for unmerged entries]'
'(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)'{-c,--cc}'[compare "our branch", "their branch" and working tree files]'
- '-q[remain silent even on nonexisting files]'
-
- # TODO: --cumulative is undocumented.
- '--cumulative[undocumented]'
- # TODO: --follow is undocumented.
- '--follow[undocumented]'
- # TODO: --textconv is undocumented.
- '--textconv[undocumented]'
- # TODO: --no-textconv is undocumented.
- '--no-textconv[undocumented]'
- # TODO: -G is undocumented.
- '-G[undocumented]'
+
# TODO: --output is undocumented.
'--output[undocumented]:undocumented')
}
@@ -5664,13 +6008,15 @@ __git_setup_revision_options () {
email\:"use email headers like From and Subject"
raw\:"the raw commits"
format\:"specify own format"))'
- '--abbrev-commit[show only partial prefixes of commit object names]'
+ '(--abbrev-commit --no-abbrev-commit)--abbrev-commit[show only partial prefixes of commit object names]'
+ '(--abbrev-commit --no-abbrev-commit)--no-abbrev-commit[show the full 40-byte hexadecimal commit object name]'
+ '(--abbrev --no-abbrev)--abbrev=[set minimum SHA1 display-length (for use with --abbrev-commit)]: :__git_guard_number length'
+ '(--abbrev --no-abbrev)--no-abbrev[show the full 40-byte hexadecimal commit object name]'
'--oneline[shorthand for --pretty=oneline --abbrev-commit]'
'--encoding=-[output log messages in given encoding]:: :__git_encodings'
- '(--no-notes --show-notes --standard-notes --no-standard-notes)--no-notes[do not show notes that annotate commit]'
- '(--no-notes --show-notes --standard-notes --no-standard-notes)--show-notes[do not show notes that annotate commit]:: :__git_note_references'
- '(--no-notes --show-notes --standard-notes --no-standard-notes)--no-standard-notes[enable populating notes ref list from core.notesRef and notes.displayRef]'
- '(--no-notes --show-notes --standard-notes --no-standard-notes)--no-standard-notes[disable populating notes ref list from core.notesRef and notes.displayRef]'
+ '(--no-notes --notes)--no-notes[do not show notes that annotate commit]'
+ '(--no-notes )*--notes=[show notes that annotate commit, with optional ref argument show this notes ref instead of the default notes ref(s)]:: :__git_notes_refs'
+ '--show-signature[validate GPG signature of commit]'
'( --date)--relative-date[show dates relative to current time]'
'(--relative-date )--date=-[format of date output]: :__git_date_formats'
'--parents[display parents of commit]'
@@ -5694,6 +6040,10 @@ __git_setup_revision_options () {
'--remove-empty[stop when given path disappears from tree]'
'--merges[display only merge commits]'
'--no-merges[do not display commits with more than one parent]'
+ '(--min-parents --no-min-parents)--min-parents=-[show only commits having at least <n> commits]: :__git_guard_number "minimum number of parents"'
+ '(--min-parents --no-min-parents)--no-min-parents[reset limit]'
+ '(--max-parents --no-max-parents)--max-parents=-[show only commits having at most <n> commits]: :__git_guard_number "maximum number of parents"'
+ '(--max-parents --no-max-parents)--no-max-parents[reset limit]'
'--first-parent[follow only first parent from merge commits]'
'*--not[reverses meaning of ^ prefix for revisions that follow]'
'--all[show all commits from refs]'
@@ -5702,8 +6052,8 @@ __git_setup_revision_options () {
'--remotes=[-show all commits from refs/remotes]::pattern'
'--glob=[show all commits from refs matching glob]:pattern'
'--stdin[read commit objects from standard input]'
- '--cherry-pick[omit any same-change commits]'
'(-g --walk-reflogs --reverse)'{-g,--walk-reflogs}'[walk reflog entries from most recent to oldest]'
+ '--grep-reflog=[limit commits to ones whose reflog message matches the given pattern (with -g, --walk-reflogs)]:pattern'
'--merge[after a failed merge, show refs that touch files having a conflict]'
'--boundary[output uninteresting commits at boundary]'
'--simplify-by-decoration[show only commits that are referenced by a ref]'
@@ -5712,28 +6062,28 @@ __git_setup_revision_options () {
'(--full-history --dense --simplify-merges --ancestry-path)--sparse[when paths are given, display only commits that changes any of them]'
'(--full-history --dense --sparse --ancestry-path)--simplify-merges[milder version of --full-history]'
'(--full-history --dense --sparse --simplify-merges )--ancestry-path[only display commits that exists directly on ancestry chains]'
- '( --date-order)--topo-order[display commits in topological order]'
- '(--topo-order )--date-order[display commits in date order]'
+ '( --date-order --author-date-order)--topo-order[display commits in topological order]'
+ '(--topo-order --author-date-order)--date-order[display commits in date order]'
+ '(--topo-order --date-order )--author-date-order[display commits in auhor date order]'
'(-g --walk-reflogs)--reverse[display commits in reverse order]'
'( --objects-edge)--objects[display object ids of objects referenced by listed commits]'
'(--objects )--objects-edge[display object ids of objects referenced by listed and excluded commits]'
'( --do-walk)--no-walk[only display given revs, do not traverse their ancestors]'
'(--no-walk )--do-walk[only display given revs, traversing their ancestors]'
+ '( --cherry-pick)--cherry-mark[like --cherry-pick but mark equivalent commits instead of omitting them]'
+ '(--cherry-pick )--cherry-pick[omit any commit that introduces the same change as another commit on "the other side" of a symmetric range]'
+ '( --right-only)--left-only[list only commits on the left side of a symmetric range]'
+ '(--left-only )--right-only[list only commits on the right side of a symmetric range]'
+ '(--left-only --right-only --cherry-pick --cherry-mark)--cherry[synonym for --right-only --cherry-mark --no-merges]'
+ '(-c --cc )--full-diff[show full commit diffs when using log -p, not only those affecting the given path]'
+ '--log-size[print log message size in bytes before the message]'
+ '--use-mailmap[use mailmap file to map author and committer names and email]'
- # TODO: --reflog is undocumented.
'--reflog[show all commits from reflogs]'
- # TODO: --default is undocumented.
'--default[use argument as default revision]:default revision:__git_revisions'
- # TODO: --full-diff is undocumented.
- '(-c --cc )--full-diff[undocumented]'
- # TODO: --abrev is undocumented.
- '--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length'
- # TODO: --no-abbrev is undocumented.
- '--no-abbrev[undocumented]'
# TODO: --early-output is undocumented.
'--early-output=-[undocumented]::undocumented'
- # TODO: --log-size is undocumented.
- '--log-size[undocumented]')
+ )
if (( words[(I)--objects(|-edge)] )); then
revision_options+=('--unpacked[print object IDs not in packs]')
@@ -5745,6 +6095,8 @@ __git_setup_merge_options () {
merge_options=(
'( --no-commit)--commit[perform the merge and commit the result]'
'(--commit )--no-commit[perform the merge but do not commit the result]'
+ '( --no-edit)--edit[open an editor to change the commit message]'
+ '(--edit )--no-edit[do not open an editor to change the commit message]'
'( --no-ff)--ff[do not generate a merge commit if the merge resolved as a fast-forward]'
'(--ff )--no-ff[generate a merge commit even if the merge resolved as a fast-forward]'
'( --no-log)--log[fill in one-line descriptions of the commits being merged in the log message]'
@@ -5756,6 +6108,8 @@ __git_setup_merge_options () {
'--ff-only[refuse to merge unless HEAD is up to date or merge can be resolved as a fast-forward]'
'*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies'
'*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]'
+ '(--verify-signatures)--no-verify-signatures[verify the commits being merged or abort]'
+ '(--no-verify-signatures)--verify-signatures[do not verify the commits being merged]'
'(-q --quiet -v --verbose)'{-q,--quiet}'[suppress all output]'
'(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]')
}
@@ -5766,6 +6120,7 @@ __git_setup_fetch_options () {
'(: *)--all[fetch all remotes]'
'(-a --append)'{-a,--append}'[append ref names and object names of fetched refs to "$GIT_DIR/FETCH_HEAD"]'
'--depth=[deepen the history of a shallow repository by the given number of commits]: :__git_guard_number depth'
+ '--unshallow[convert a shallow clone to a complete one]'
'--dry-run[show what would be done, without making any changes]'
'(-f --force)'{-f,--force}'[allow refs that are not ancestors to be updated]'
'(-k --keep)'{-k,--keep}'[keep downloaded pack]'
@@ -5774,6 +6129,13 @@ __git_setup_fetch_options () {
'(--no-tags -t --tags)'{-t,--tags}'[fetch remote tags]'
'(-u --update-head-ok)'{-u,--update-head-ok}'[allow updates of current branch head]'
'--upload-pack=[specify path to git-upload-pack on remote side]:remote path'
+ '(--no-recurse-submodules --recurse-submodules)--recurse-submodules=-[specify when to fetch commits of submodules]::recursive fetching mode:((no\:"disable recursion"
+ yes\:"always recurse"
+ on-demand\:"only when submodule reference in superproject is updated"))'
+ '(--no-recurse-submodules --recurse-submodules)--no-recurse-submodules[disable recursive fetching of submodules]'
+ '(--no-recurse-submodules)--recurse-submodules-default=-[provide internal temporary non-negative value for "--recurse-submodules"]::recursive fetching mode:((yes\:"always recurse"
+ on-demand\:"only when submodule reference in superproject is updated"))'
+ '--submodule-prefix=-[prepend <path> to paths printed in informative messages]:submodule prefix path:_files -/'
'(-q --quiet -v --verbose --progress)'{-q,--quiet}'[suppress all output]'
'(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]'
'(-q --quiet)--progress[output progress information]')
@@ -5787,7 +6149,10 @@ __git_setup_apply_options () {
'-C-[ensure at least N lines of context match before and after each change]: :_guard "[[\:digit\:]]#" "number of lines of context"'
'--reject[apply hunks that apply and leave rejected hunks in .rej files]'
'(--ignore-space-change --ignore-whitespace)'{--ignore-space-change,--ignore-whitespace}'[ignore changes in whitespace in context lines]'
- '--directory=[root to prepend to all filenames]:root:_directories')
+ '--directory=[root to prepend to all filenames]:root:_directories'
+ '*--exclude=[skip files matching specified pattern]:pattern'
+ '*--include=[include files matching specified pattern]:pattern'
+ )
}
# Git Config Helpers
@@ -5879,7 +6244,7 @@ __git_config_values () {
default=$2
shift 2
values=($*)
- [[ -n $current ]] && values[(r)$(__git_pattern_escape $default):*]+=' (current)'
+ [[ -n $current ]] && values[(r)$(__git_pattern_escape $current):*]+=' (current)'
values[(r)$(__git_pattern_escape $default):*]+=' (default)'
_describe -t ${opts[-t]:-values} ${opts[-l]:-value} values
@@ -5896,6 +6261,8 @@ __git_browsers () {
builtinbrowsers=(
firefox
iceweasel
+ google-chrome
+ chromium
konquerer
w3m
links
@@ -6039,9 +6406,10 @@ __git_sendemail_suppresscc_values () {
author:'avoid including patch author' \
self:'avoid including sender' \
cc:'avoid including anyone mentioned in Cc lines except for self' \
- bodycc:'avoid including anyone mentiond in Cc lines in patch body except for self' \
- sob:'avoid including anyone mentiond in Signed-off-by lines except for self' \
+ bodycc:'avoid including anyone mentioned in Cc lines in patch body except for self' \
+ sob:'avoid including anyone mentioned in Signed-off-by lines except for self' \
cccmd:'avoid running --cc-cmd' \
+ tocmd:'avoid running --to-cmd' \
body:'equivalent to sob + bodycc' \
all:'avoid all auto Cc values'
}
@@ -6102,13 +6470,17 @@ _git() {
'(- :)--help[display help message]' \
'-c[pass configuration parameter to command]:parameter' \
'--exec-path=-[path containing core git-programs]:: :_directories' \
- '--html-path[display path to HTML documentation and exit]' \
+ '(: -)--man-path[print the manpath for the man pages for this version of Git and exit]' \
+ '(: -)--info-path[print the path where the info files are installed and exit]' \
+ '(: -)--html-path[display path to HTML documentation and exit]' \
'(-p --paginate)'{-p,--paginate}'[pipe output into $PAGER]' \
'--no-pager[do not pipe git output into a pager]' \
'--git-dir=-[path to repository]: :_directories' \
'--work-tree=-[path to working tree]: :_directories' \
+ '--namespace=-[set the Git namespace]: :_directories' \
'--bare[use $PWD as repository]' \
'--no-replace-objects[do not use replacement refs to replace git objects]' \
+ '--literal-pathspecs[treat pathspecs literally, rather than as glob patterns]' \
'(-): :->command' \
'(-)*:: :->option-or-argument' && return
diff --git a/Completion/Unix/Command/_gradle b/Completion/Unix/Command/_gradle
index bc5aed0cd..9a75daefb 100644
--- a/Completion/Unix/Command/_gradle
+++ b/Completion/Unix/Command/_gradle
@@ -24,7 +24,7 @@ zstyle -a ":completion:*:*:$service:*" tag-order tag_order || \
zstyle -T ":completion:*:*:$service:*" gradle-inspect || gradle_inspect=no
_arguments -C \
- '(-)'{-\?,-h,--help}'[Shows this help message.]' \
+ '(-)'{-\?,-h,--help}'[Shows a help message.]' \
{-a,--no-rebuild}'[Do not rebuild project dependencies.]' \
{-b,--build-file}'[Specifies the build file.]:build file:_files -g "*.gradle(-.)"' \
{-C,--cache}'[Specifies how compiled build scripts should be cached.]:cache policy:(on rebuild)' \
@@ -45,12 +45,17 @@ _arguments -C \
'--offline[The build should operate without accessing network resources.]' \
\*{-P+,--project-prop}'[Set project property for the build script (e.g. -Pmyprop=myvalue).]:project property (prop=val):' \
{-p,--project-dir}'[Specifies the start directory for Gradle.]:start directory:_directories' \
+ '--parallel[Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]' \
+ '--parallel-threads[Build projects in parallel, using the specified number of executor threads.]' \
'--profile[Profiles build execution time and generates a report in the <build_dir>/reports/profile directory.]' \
'--project-cache-dir[Specifies the project-specific cache directory.]:cache directory:_directories' \
'(-d --debug -i --info)'{-q,--quiet}'[Log errors only.]' \
- "--refresh[Refresh the state of resources of the type(s) specified.]:refresh policy:(dependencies)" \
- '(-s --stacktrace)'{-S,--full-stacktrace}'[Print out the full (very verbose) stacktrace for all exceptions.]' \
+ '--recompile-scripts[Force build script recompiling.]' \
+ '--refresh[Refresh the state of resources of the type(s) specified.]:refresh policy:(dependencies)' \
+ '--refresh-dependencies[Refresh the state of dependencies.]' \
+ '--rerun-tasks[Ignore previously cached task results.]' \
'(-S --full-stacktrace)'{-s,--stacktrace}'[Print out the stacktrace for all exceptions.]' \
+ '(-s --stacktrace)'{-S,--full-stacktrace}'[Print out the full (very verbose) stacktrace for all exceptions.]' \
'(-)--stop[Stops the Gradle daemon if it is running.]' \
{-u,--no-search-upward}"[Don't search in parent folders for a settings.gradle file.]" \
'(-)'{-v,--version}'[Print version info.]' \
@@ -58,7 +63,7 @@ _arguments -C \
'*:task:->task' \
&& ret=0
-if [[ -n $state ]]; then
+if [[ $words[CURRENT] != -* ]]; then
if [[ $gradle_inspect == yes ]]; then
# If a build file is specified after '-b' or '--build-file', use this file. Otherwise,
# default is the file 'build.gradle' in the current directory.
@@ -102,7 +107,8 @@ if [[ -n $state ]]; then
fi
else
_describe 'built-in tasks' '(
- "dependencies:Displays the dependencies of root project."
+ "dependencies:Displays all dependencies declared in root project."
+ "dependencyInsight:Displays the insight into a specific dependency in root project."
"help:Displays a help message."
"projects:Displays the sub-projects of root project."
"properties:Displays the properties of root project."
diff --git a/Completion/Unix/Command/_graphicsmagick b/Completion/Unix/Command/_graphicsmagick
index 03b0106a3..d18ffbc7f 100644
--- a/Completion/Unix/Command/_graphicsmagick
+++ b/Completion/Unix/Command/_graphicsmagick
@@ -3,7 +3,7 @@
local state line expl formats curcontext="$curcontext"
typeset -A opt_args
-formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xwd:xbm:xpm:yuv
+formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
if (( $# )); then
_files "$@" -g "*.(#i)(${~formats//:/|})(-.)"
diff --git a/Completion/Unix/Command/_gzip b/Completion/Unix/Command/_gzip
index 5c88fac39..a90f23273 100644
--- a/Completion/Unix/Command/_gzip
+++ b/Completion/Unix/Command/_gzip
@@ -82,7 +82,11 @@ files)
_files "$expl[@]" -g '^*.(([tT]|)[gG]|)[zZ](-.)' && return
else
_description files expl 'compressed file'
- _files "$expl[@]" -g '*.(([tT]|)[gG]|)[zZ](-.)' && return
+ if (( $+opt_args[-f] )); then
+ _files "$expl[@]" && return
+ else
+ _files "$expl[@]" -g '*.(([tT]|)[gG]|)[zZ](-.)' && return
+ fi
fi
fi
;;
diff --git a/Completion/Unix/Command/_imagemagick b/Completion/Unix/Command/_imagemagick
index 56d530326..5876adc47 100644
--- a/Completion/Unix/Command/_imagemagick
+++ b/Completion/Unix/Command/_imagemagick
@@ -11,7 +11,7 @@ typeset -A opt_args
#
# and certainly many other things...
-formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xwd:xbm:xpm:yuv
+formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
if (( $# )); then
_files "$@" -g "*.(#i)(${~formats//:/|})(-.)"
diff --git a/Completion/Unix/Command/_java b/Completion/Unix/Command/_java
index f6565bc64..7b1dce18f 100644
--- a/Completion/Unix/Command/_java
+++ b/Completion/Unix/Command/_java
@@ -229,7 +229,7 @@ keytool)
'-keypass[password for private key]:password for private key:' \
'-validity[valid days]:number of days:' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- import \
@@ -240,7 +240,7 @@ keytool)
'-noprompt[disable interaction with the user]' \
'-trustcacerts[use cacerts]' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- selfcert \
@@ -251,14 +251,14 @@ keytool)
'-validity[valid days]:number of days:' \
'-keypass[password for private key]:password for private key:' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- identitydb \
'-identitydb[command to read identity database]' \
'-file[specify identity database file]:identity database file:_files' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- certreq \
@@ -268,7 +268,7 @@ keytool)
'-file[specify certificate signing request file]:certificate signing request file:_files' \
'-keypass[password for private key]:password for private key:' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- export \
@@ -277,14 +277,14 @@ keytool)
'-file[specify certificate file]:certificate file:_files' \
'-rfc[make certificate format printable as RFC 1421]' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- list \
'-list[command to print keystore entry]' \
'-alias[alias]:alias:' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'(-rfc)-v[make certificate format human-readable]' \
'(-v)-rfc[make certificate format printable as RFC 1421]' \
@@ -299,14 +299,14 @@ keytool)
'-keypass[password for private key]:password for private key:' \
'-new[password for private key of new entry]:password for private key of new entry:' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- storepasswd \
'-storepasswd[command to change password for keystore]' \
'-new[new password]:new password:' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- keypasswd \
@@ -315,14 +315,14 @@ keytool)
'-keypass[old password for private key]:old password for private key:' \
'-new[nwe password for private key]:new password for private key:' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- delete \
'-delete[command to delete entry]' \
'-alias[alias]:alias:' \
'-storetype[keystore type]:store type:' \
- '-keystore[keystore location]:keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storepass[password for keystore]:password:' \
'-v[verbose mode]' \
- help \
@@ -331,7 +331,7 @@ keytool)
jarsigner)
_arguments \
- '-keystore[specify URL for keystore location]:URL for keystore location:' \
+ '-keystore[keystore location]:keystore location:_files' \
'-storetype[specify keystore type]:store type:' \
'-storepass[specify password for keystore]:password:' \
'-keypass[specify password for private key]:password:' \
diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index 53e2e1b3e..e5a513f64 100644
--- a/Completion/Unix/Command/_make
+++ b/Completion/Unix/Command/_make
@@ -1,4 +1,4 @@
-#compdef make gmake pmake dmake
+#compdef make gmake pmake dmake freebsd-make bmake
# TODO: Based on targets given on the command line, show only variables that
# are used in those targets and their dependencies.
@@ -59,7 +59,7 @@ _make-expandVars() {
}
_make-parseMakefile () {
- local input var val target dep TAB=$'\t' dir=$1 tmp
+ local input var val target dep TAB=$'\t' dir=$1 tmp IFS=
while read input
do
@@ -148,7 +148,9 @@ _make-findBasedir () {
_make() {
local prev="$words[CURRENT-1]" file expl tmp is_gnu dir incl match
- local -A TARGETS VARIABLES
+ local context state state_descr line
+ local -a option_specs
+ local -A TARGETS VARIABLES opt_args
local ret=1
_pick_variant -r is_gnu gnu=GNU unix -v -f
@@ -156,21 +158,77 @@ _make() {
if [[ $is_gnu == gnu ]]
then
incl="(-|)include"
+ option_specs=(
+ '(-B --always-make)'{-B,--always-make}'[unconditionally make all targets]'
+ '*'{-C,--directory=}'[change directory first]:change to directory:->dir'
+ '-d[print lots of debug information]'
+ '--debug=-[print various types of debug information]:debug options:->debug'
+ '(-e --environment-overrides)'{-e,--environment-overrides}'[environment variables override makefiles]'
+ '--eval=-[evaluate STRING as a makefile statement]:STRING'
+ '(-f --file --makefile)'{-f,--file=,--makefile=}'[read FILE as a makefile]:makefile:->file'
+ '(- *)'{-h,--help}'[print help message and exit]'
+ '(-i --ignore-errors)'{-i,--ignore-errors}'[ignore errors from recipes]'
+ '*'{-I,--include-dir=}'[search DIRECTORY for included makefiles]:search path for included makefile:->dir'
+ '(-j --jobs)'{-j,--jobs=}'[allow N jobs at once; infinite jobs with no arg]:number of jobs'
+ '(-k --keep-going)'{-k,--keep-going}"[keep going when some targets can't be made]"
+ '(-l --load-average --max-load)'{-l,--load-average=,--max-load}"[don't start multiple jobs unless load is below N]:load"
+ '(-L --check-symlik-times)'{-L,--check-symlink-times}'[use the latest mtime between symlinks and target]'
+ '(-n --just-print --dry-run --recon)'{-n,--just-print,--dry-run,--recon}"[don't actually run any recipe; just print them]"
+ '*'{-o,--old-file=,--assume-old=}"[consider FILE to be very old and don't remake it]:file not to remake:->file"
+ '(-p --print-data-base)'{-p,--print-data-base}'[print makes internal database]'
+ '(-q --question)'{-q,--question}'[run no recipe; exit status says if up to date]'
+ '(-r --no-builtin-rules)'{-r,--no-builtin-rules}'[disable the built-in implicit rules]'
+ '(-R --no-builtin-variables)'{-R,--no-builtin-variables}'[disable the built-in variable settings]'
+ '(-s --silent --quiet)'{-s,--silent,--quiet}"[don't echo recipes]"
+ '(-S --no-keep-going --stop)'{-S,--no-keep-going,--stop}'[turns off -k]'
+ '(-t --touch)'{-t,--touch}'[touch targets instead of remaking them]'
+ '(- *)'{-v,--version}'[print the version number of make and exit]'
+ '(-w --print-directory)'{-w,--print-directory}'[print the current directory]'
+ '--no-print-directory[turn off -w, even if it was turned on implicitly]'
+ '*'{-W,--what-if=,--new-file=,--assume-new=}'[consider FILE to be infinitely new]:file to treat as modified:->file'
+ '--warn-undefined-variables[warn when an undefined variable is referenced]'
+ '--warn-undefined-functions[warn when an undefined user function is called]'
+ )
else
+ # Basic make options only.
incl=.include
+ option_specs=(
+ '-C[change directory first]:directory:->dir'
+ '-I[include directory for makefiles]:directory:->dir'
+ '-f[specify makefile]:makefile:->file'
+ '-o[specify file not to remake]:file not to remake:->file'
+ '-W[pretend file was modified]:file to treat as modified:->file'
+ )
fi
- if [[ "$prev" == -[CI] ]]
- then
- _files -W ${(q)$(_make-findBasedir ${words[1,CURRENT-1]})} -/ && ret=0
- elif [[ "$prev" == -[foW] ]]
- then
- _files -W ${(q)$(_make-findBasedir $words)} && ret=0
- else
- file="$words[(I)-f]"
- if (( file ))
+ _arguments -s $option_specs \
+ '*:make target:->target' && ret=0
+
+ case $state in
+ (dir)
+ _description directories expl "$state_descr"
+ _files "$expl[@]" -W ${(q)$(_make-findBasedir ${words[1,CURRENT-1]})} -/ && ret=0
+ ;;
+
+ (file)
+ _description files expl "$state_descr"
+ _files "$expl[@]" -W ${(q)$(_make-findBasedir $words)} && ret=0
+ ;;
+
+ (debug)
+ _values -s , 'debug options' \
+ '(b v i j m)a[all debugging output]' \
+ 'b[basic debugging output]' \
+ '(b)v[one level above basic]' \
+ '(b)i[describe implicit rule searches (implies b)]' \
+ 'j[show details on invocation of subcommands]' \
+ 'm[enable debugging while remaking makefiles]' && ret=0
+ ;;
+
+ (target)
+ file=${(v)opt_args[(I)(-f|--file|--makefile)]}
+ if [[ -n $file ]]
then
- file=${~words[file+1]}
[[ $file == [^/]* ]] && file=${(q)$(_make-findBasedir $words)}/$file
[[ -r $file ]] || file=
else
@@ -222,7 +280,7 @@ _make() {
compadd -S '=' -- ${(k)VARIABLES} && ret=0
done
fi
- fi
+ esac
return ret
}
diff --git a/Completion/Unix/Command/_osc b/Completion/Unix/Command/_osc
deleted file mode 100644
index a18890f5e..000000000
--- a/Completion/Unix/Command/_osc
+++ /dev/null
@@ -1,149 +0,0 @@
-#compdef osc
-#
-# Copyright (C) 2009,2010 Holger Macht <holger@homac.de>
-#
-# This file is released under the GPLv2.
-#
-# Based on the zsh guide from http://zsh.dotsrc.org/Guide/zshguide06.html
-#
-# Toggle verbose completions: zstyle ':completion:*:osc:*' verbose no
-# zstyle ':completion:*:osc-subcommand:*' verbose no
-#
-# Use the variables $ZSH_OSC_BUILD_TARGETS_EXTRA and $ZSH_OSC_PROJECTS_EXTRA to
-# extend the list of possible completions in your ~/.zshrc like that:
-# export OSC_PROJECTS_EXTRA="Base:System Base:shells"
-#
-# version 0.2
-#
-
-OSC_BUILD_TARGETS="openSUSE_11.2 openSUSE_11.3 openSUSE_11.4 openSUSE_12.1 openSUSE_Tumbleweed openSUSE_Factory SLE_11_SP1"
-OSC_PROJECTS="openSUSE:Factory openSUSE:Tumbleweed openSUSE:12.1 openSUSE:11.4 openSUSE:11.2 openSUSE:11.3"
-
-# user defined variables $OSC_BUILD_TARGETS_EXTRA and
-# $OSC_PROJECTS_EXTRA can add to the project/build target list
-OSC_BUILD_TARGETS="$OSC_BUILD_TARGETS $ZSH_OSC_BUILD_TARGETS_EXTRA"
-OSC_PROJECTS="$OSC_PROJECTS $ZSH_OSC_PROJECTS_EXTRA"
-
-# Main dispatcher
-
-_osc() {
- if (( CURRENT > 2 )) && [[ ${words[2]} != "help" ]]; then
- # Remember the subcommand name
- local cmd=${words[2]}
- # Set the context for the subcommand.
- curcontext="${curcontext%:*:*}:osc-subcommand"
- # Narrow the range of words we are looking at to exclude `osc'
- (( CURRENT-- ))
- shift words
- # Run the completion for the subcommand
- if [ "$cmd" = "submitreq" -o "$cmd" = "sr" ]; then
- _osc_cmd_submitreq
- elif [ "$cmd" = "getbinaries" ]; then
- _osc_cmd_getbinaries
- elif [ "$cmd" = "checkout" -o "$cmd" = "co" -o "$cmd" = "branch" ]; then
- _osc_cmd_checkout
- elif [ "$cmd" = "buildlog" -o "$cmd" = "buildinfo" -o "$cmd" = "bl" ]; then
- _osc_cmd_buildlog
- else
- _osc_cmd_do $cmd
- fi
- else
- local hline
- local -a cmdlist
- local tag=0
- _call_program help-commands osc help | while read -A hline; do
- # start parsing with "commands:"
- [[ $hline[1] = "commands:" ]] && tag=1
- # stop parsing at the line starting with "For"
- [[ $hline[1] = "For" ]] && tag=0
- [[ $tag = 0 ]] && continue
- # all commands have to start with lower case letters
- [[ $hline[1] =~ ^[A-Z] ]] && continue
- (( ${#hline} < 2 )) && continue
-
- # ${hline[1]%,} truncates the last ','
- cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
- done
- _describe -t osc-commands 'osc command' cmdlist
- fi
-}
-
-_osc_cmd_getbinaries() {
- _arguments \
- '1:PROJECT:( `echo $OSC_PROJECTS` )' \
- '2:PACKAGE:(PACKAGE)' \
- '3:REPOSITORY:( `echo $OSC_BUILD_TARGETS` )' \
- '4:ARCHITECTURE:(i586 x86_64)'
-}
-
-_osc_cmd_checkout() {
- _arguments \
- '1:PROJECT:( `echo $OSC_PROJECTS` )' \
- '2:PACKAGE:(PACKAGE)'
-}
-
-_osc_cmd_buildlog() {
- _arguments \
- '1:REPOSITORY:( `echo $OSC_BUILD_TARGETS` )' \
- '2:ARCHITECTURE:(i586 x86_64)'
-}
-
-_osc_cmd_submitreq() {
- local hline
- local -a cmdlist
- local tag=0
- _call_program help-commands osc help $cmd | while read -A hline; do
- # start parsing from "usage:"
- [[ $hline[1] = "usage:" ]] && tag=1
- [[ $tag = 0 ]] && continue
-
- if [[ $hline[1] =~ ^osc ]]; then
- shift hline; shift hline
- elif ! [[ $hline[1] =~ ^- ]]; then
- # Option has to start with a '-' or 'osc submitrequest'
- continue
- fi
-
- (( ${#hline} < 2 )) && continue
-
- cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-
- done
-
- _describe -t osc-commands 'osc command' cmdlist
-}
-
-
-_osc_cmd_do() {
- local hline
- local -a cmdlist
- local tag=0
-
- # only start completion if theres some '-' on the line
- if ! [ "$words[2]" = "-" ]; then
- _complete
- return
- fi
-
- _call_program help-commands osc help $cmd | while read -A hline; do
- # start parsing from "Options:"
- [[ $hline[1] = "Options:" ]] && tag=1
- [[ $tag = 0 ]] && continue
- # Option has to start with a '-'
- [[ $hline[1] =~ ^- ]] || continue
- (( ${#hline} < 2 )) && continue
-
- cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
- done
-
- if [ -n "$cmdlist" ]; then
- _describe -t osc-commands 'osc command' cmdlist
- else
- _complete
- fi
-}
-
-# Code to make sure _osc is run when we load it
-_osc "$@"
-
-
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index d2943472c..bcfe5229a 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -1401,16 +1401,18 @@ _perforce_jobs() {
if [[ $argv[-2] = -e ]]; then
ajobview=(-e "${(q)argv[-1]}")
argv=("${(@)argv[1,-3]}")
- else
- zstyle -s ":completion:${curcontext}:jobs" jobview jobview &&
- ajobview=(-e $jobview)
+ elif zstyle -s ":completion:${curcontext}:jobs" jobview jobview; then
+ ajobview=(-e "'$jobview'")
+ elif [[ -n $PREFIX ]]; then
+ # Extra quotes for the benefit of _call_program which does an "eval".
+ ajobview=(-e "'job=$PREFIX\\*$SUFFIX'")
fi
if [[ ${NUMERIC:-0} -lt 0 && -z $compstate[insert] ]]; then
# Not inserting (i.e. just listing) and given a negative
# prefix argument. Instead of listing possible completions,
# show the full description for the job which is on the line at
# the moment.
- _message -r "$(_perforce_call_p4 jobs jobs -e \"Job=\$PREFIX\$SUFFIX\" -l 2>/dev/null)"
+ _message -r "$(_perforce_call_p4 jobs jobs -e \"'Job=\$PREFIX\$SUFFIX'\" -l 2>/dev/null)"
return 0
elif [[ ${NUMERIC:-0} -gt 0 ]]; then
max=$NUMERIC
diff --git a/Completion/Unix/Command/_prove b/Completion/Unix/Command/_prove
new file mode 100644
index 000000000..75e83c360
--- /dev/null
+++ b/Completion/Unix/Command/_prove
@@ -0,0 +1,51 @@
+#compdef prove
+#
+# prove(1) of TAP::Harness v3.25. Consider also:
+#
+# zstyle ':completion:*:*:prove:*' file-patterns '*.t:test\ files *(-/):directories'
+
+_arguments \
+ '(- *)'{-h,--help}'[display help and exit]' \
+ '(- *)'{-H,--man}'[display longer help and exit]' \
+ '(- *)--version[display version and exit]' \
+ '(--quiet -q -Q --QUIET)'{-v,--verbose}'[print all test lines]' \
+ {-l,--lib}'[add lib to path]' \
+ {-b,--blib}'[add blib to path]' \
+ '(--reverse)'{-s,--shuffle}'[run tests in random order]' \
+ '(--nocolor)'{-c,--color}'[colored test output]' \
+ '(--color -c)--nocolor[do not color test output]' \
+ '(--nocount)--count[show x/y test count when not verbose]' \
+ '(--count)--nocount[disable x/y test count]' \
+ {-D,--dry}'[dry run]' \
+ '--ext=[set extension for tests]:extension:' \
+ {-f,--failures}'[show failed tests]' \
+ {-o,--comments}'[show comments]' \
+ '--ignore-exit[ignore exit status from test scripts]' \
+ {-m,--merge}'[merge STDERR with STDOUT]' \
+ {-r,--recurse}'[recurse into directories]' \
+ '(-s --shuffle)--reverse[run tests in reverse order]' \
+ '(-v --verbose)'{-q,--quiet}'[suppress some test output]' \
+ '(-v --verbose)'{-Q,--QUIET}'[only print summary results]' \
+ {-p,--parse}'[show full list of TAP parse errors]' \
+ '--directives[only show results for which TODO or SKIP set]' \
+ '--timer[print elapsed time]' \
+ '--trap[trap ctrl-c and print summary on interrupt]' \
+ '--normalize[normalize TAP output in verbose mode]' \
+ '-T[enable tainting checks]' \
+ '-t[enable tainting warnings]' \
+ '-W[enable fatal warnings]' \
+ '-w[enable warnings]' \
+ '--norc[do not process .proverc]' \
+ '*-I=[library paths to include]:libdir:_directories' \
+ '*-P=[load plugin]:plugin:' \
+ '*-M=[load a module]:module:_perl_m_opt' \
+ {-e,--exec}'[interpreter to run the tests]:program: _command_names '{-e,--exec}':*::program arguments: _normal' \
+ '--harness=[define test harness]:harness:' \
+ '--formatter=[result formatter]:formatter:' \
+ '--source=[load or configure a SourceHandler]:source:' \
+ {-a,--archive}'[store output in archive file]:file:_files' \
+ {-j,--jobs}'[run N jobs in parallel]:jobs:' \
+ '*--state=[control persistent state]:state:' \
+ '--rc=[custom rcfile]:file:_files' \
+ '*:file or directory:_files' \
+ && return 0
diff --git a/Completion/Unix/Command/_psutils b/Completion/Unix/Command/_psutils
index b2e713e6d..1dafb46c3 100644
--- a/Completion/Unix/Command/_psutils
+++ b/Completion/Unix/Command/_psutils
@@ -13,16 +13,16 @@ epsffit)
':lower left y:' \
':upper right x:' \
':upper right y:' \
- ':input file:_ps' \
- ':output file:_ps'
+ ':input file:_postscript' \
+ ':output file:_postscript'
;;
psbook)
_arguments \
'-q[quiet mode]' \
'-v[print version]' \
'-s-[signature size]:signature size:' \
- ':input file:_ps' \
- ':output file:_ps'
+ ':input file:_postscript' \
+ ':output file:_postscript'
;;
psnup)
_arguments \
@@ -47,8 +47,8 @@ psnup)
'(-2 -4 -n)-8[8 logical pages on a sheet]' \
'(-2 -4 -8 )-n[n-up]:pages on a sheet:' \
'-t-[layout tolerance]:layout tolerance:' \
- ':input file:_ps' \
- ':output file:_ps'
+ ':input file:_postscript' \
+ ':output file:_postscript'
;;
psresize)
_arguments \
@@ -60,8 +60,8 @@ psresize)
'(-P)-W-[input page width]:input paper width:' \
'(-P)-H-[input page height]:input paper height:' \
'(-W -H)-P-[input page paper]:input paper paper:(a3 a4 a5 b5 letter legal 10x14)' \
- ':input file:_ps' \
- ':output file:_ps'
+ ':input file:_postscript' \
+ ':output file:_postscript'
;;
psselect)
_arguments \
@@ -71,8 +71,8 @@ psselect)
'-o[select odd pages]' \
'-r[reverse order]' \
'-p-[pages]:pages:' \
- ':input file:_ps' \
- ':output file:_ps'
+ ':input file:_postscript' \
+ ':output file:_postscript'
;;
pstops)
_arguments \
@@ -84,28 +84,28 @@ pstops)
'(-p)-h-[page height]:paper height:' \
'(-w -h)-p-[page size]:paper size:(a3 a4 a5 b5 letter legal 10x14)' \
':[modulo\:][-]pageno[L][R][U][@scale][(xoff,yoff)][+|,]...:' \
- ':input file:_ps' \
- ':output file:_ps'
+ ':input file:_postscript' \
+ ':output file:_postscript'
;;
extractres)
_arguments \
'-m[merge]' \
- ':input file:_ps'
+ ':input file:_postscript'
;;
fixmacps)
_arguments \
'-d[directory]:directory:_files -/' \
'-n[name]:name:' \
- ':input file:_ps'
+ ':input file:_postscript'
;;
psmerge)
_arguments \
- '-o-[output file]:output file:_ps' \
+ '-o-[output file]:output file:_postscript' \
'-t[thorough]' \
- '*:input file:_ps'
+ '*:input file:_postscript'
;;
fixdlsrps|fixfmps|fixpsditps|fixpspps|fixscribeps|fixtpps|fixwfwps|fixwpps|fixwwps|includeres)
- _ps
+ _postscript
;;
getafm)
_arguments \
diff --git a/Completion/Unix/Command/_qemu b/Completion/Unix/Command/_qemu
index db4b3a445..8ba7140a1 100644
--- a/Completion/Unix/Command/_qemu
+++ b/Completion/Unix/Command/_qemu
@@ -1,8 +1,8 @@
-#compdef qemu
+#compdef -P qemu(|-system-*)
_qemu_log_items () {
local -a opts hline
- qemu -d \? | while read -A hline; do
+ $service -d \? | while read -A hline; do
[[ $hline[1] = Log ]] && continue
opts=($opts "${hline[1]}[${hline[2,-1]}]")
done
@@ -11,7 +11,7 @@ _qemu_log_items () {
local _qemu_machines
-_qemu_machines=(${${${(f)"$(qemu -M \?)"}[2,-1]}%% *})
+_qemu_machines=(${${${(f)"$($service -M \?)"}[2,-1]}%% *})
_arguments \
'-'{fda,fdb,hda,hdb,hdc,hdd,cdrom}':disk image:_files' \
diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync
index f24a06e47..a531d7df6 100644
--- a/Completion/Unix/Command/_rsync
+++ b/Completion/Unix/Command/_rsync
@@ -74,7 +74,7 @@ _rsync() {
_arguments -s \
'*'{-v,--verbose}'[increase verbosity]' \
{--no-v,--no-verbose}'[turn off --verbose]' \
- '--bwlimit=[limit I/O bandwidth]:KBytes per second' \
+ '--bwlimit=[limit I/O bandwidth]:KBytes (etc.) per second' \
'--port=[specify alternate port number]:port:(873)' \
'--address=[bind to the specified address]:bind address:_bind_addresses' \
'(-T --temp-dir)'{-T,--temp-dir=}'[create temporary files in specified directory]:directory:_directories' \
@@ -137,6 +137,7 @@ _rsync() {
'(-t --times)'{-t,--times}'[preserve times]' \
{--no-t,--no-times}'[turn off --times]' \
'(-O --omit-dir-times)'{-O,--omit-dir-times}'[omit directories when preserving times]' \
+ '(-J --omit-link-times)'{-J,--omit-link-times}'[omit symlinks when preserving times]' \
'--chmod[change destination permissions]:mods' \
'(-S --sparse)'{-S,--sparse}'[handle sparse files efficiently]' \
'(-n --dry-run)'{-n,--dry-run}'[show what would have been transferred]' \
@@ -210,6 +211,16 @@ _rsync() {
'(--only-write-batch)--write-batch=[write a batched update to the specified file]:file:_files' \
'(--write-batch)--only-write-batch=[like --write-batch but w/o updating destination]:file:_files' \
'--protocol=[force an older protocol version to be used]:number' \
+ '--info=[fine-grained informational verbosity]:comma-separated list' \
+ '--debug=[fine-grained debug verbosity]:comma-separated list' \
+ '--munge-links[munge symlinks to make them safer, but unusable]' \
+ '--ignore-missing-args[ignore missing source args without error]' \
+ '--delete-missing-args[delete missing source args from destination]' \
+ '(--usermap --chown)--usermap=[custom username mapping]:comma-separated mappings' \
+ '(--groupmap --chown)--groupmap=[custom groupname mapping]:comma-separated mappings' \
+ '(--usermap --groupmap --chown)--chown=[simple username/groupname mapping]:user and/or group' \
+ '*'{-M=,--remote-option=}'[send option to the remote side only]:option string' \
+ '--preallocate[preallocate the full length of new files]' \
'--iconv=[request charset conversion of filenames]:number' \
'--read-batch=[read a batched update from the specified file]:file:_files'
}
diff --git a/Completion/Unix/Command/_sed b/Completion/Unix/Command/_sed
index 99bd5e82a..476575205 100644
--- a/Completion/Unix/Command/_sed
+++ b/Completion/Unix/Command/_sed
@@ -12,8 +12,10 @@ args=(
if _pick_variant gnu=GNU unix --version; then
args+=(
+ '--follow-symlinks[follow symlinks when processing in place]'
'(-i --in-place)'{-i-,--in-place=-}'[edit files in place]::suffix for backup'
'(-l --line-length)'{-l,--line-length=-}'[specify line-wrap length for the l command]'
+ '(-r)--posix[disable GNU extensions]'
'(-r --regexp-extended)'{-r,--regexp-extended}'[use extended regular expressions]'
'(-s --separate)'{-s,--separate}'[consider files separately instead of as a combined stream]'
'(-u --unbuffered)'{-u,--unbuffered}'[disable data buffering]'
diff --git a/Completion/Unix/Command/_sh b/Completion/Unix/Command/_sh
index 7258e4260..104c7576c 100644
--- a/Completion/Unix/Command/_sh
+++ b/Completion/Unix/Command/_sh
@@ -5,10 +5,7 @@ if [[ $service == zsh ]]; then
if [[ ${words[CURRENT-1]} == -o ]]; then
_options
# no other possibilities
- return 0
- fi
- if _arguments -S -s -- '*:'; then
- return 0
+ return
fi
fi
@@ -25,3 +22,9 @@ else
fi
_default
fi
+
+local ret=$?
+
+[[ $service == zsh ]] && _arguments -S -s -- '*:' && ret=0
+
+return ret
diff --git a/Completion/Unix/Command/_sort b/Completion/Unix/Command/_sort
index 1ea5a6e40..ff36b9b3d 100644
--- a/Completion/Unix/Command/_sort
+++ b/Completion/Unix/Command/_sort
@@ -1,31 +1,37 @@
#compdef sort
-# zsh completions for GNU sort version 5.97
-# limitation: --key does not work exactly right
-local arguments
+local ordering='(-d --dictionary-order -g --general-numeric-sort -M --month-sort -h --human-numeric-sort -n --numeric-sort --sort -V --version-sort --help --version)'
-arguments=(
- '(-b --ignore-leading-blanks)'{-b,--ignore-leading-blanks}'[ignore leading blanks]'
- '(-d --dictionary-order)'{-d,--dictionary-order}'[consider only blanks and alphanumeric characters]'
- '(-f --ignore-case)'{-f,--ignore-case}'[fold lower case to upper case characters]'
- '(-g --general-numeric-sort)'{-g,--general-numeric-sort}'[compare according to general numeric value]'
- '(-i --ignore-nonprinting)'{-i,--ignore-nonprinting}'[consider only printable characters]'
- '(-M --month-sort)'{-M,--month-sort}"[compare (unknown) < 'JAN' < ... < 'DEC']"
- '(-n --numeric-sort)'{-n,--numeric-sort}'[compare according to string numerical value]'
- '(-r --reverse)'{-r,--reverse}'[reverse the result of comparisons]'
- '(-c --check)'{-c,--check}'[check whether input is sorted; do not sort]'
- '(-k --key)'{-k+,--key=}'[start a key at POS1, end it as POS2 (origin 1)]:key:'
- '(-m --merge)'{-m,--merge}'[merge already sorted files; do not sort]'
- '(-o --output)'{-o+,--output=}'[write result to FILE instead of standard output]:filename:_files'
- '(-s --stable)'{-s+,--stable=}'[stabilize sort by disabling last-resort comparison]'
- '(-S --buffer-size)'{-S+,--buffer-size=}'[use SIZE for main memory buffer]:size:'
- '(-t --field-separator)'{-t+,--field-separator=}'[use SEP instead of non-blank to blank transition]:separator:'
- '(-T --temporary-directory)'{-T+,--temporary-directory=}'[use DIR for temporaries, not $TMPDIR or /tmp; multiple options specify multiple directories]:directory'
- '(-u --unique)'{-u,--unique}'[with -c, check for strict ordering; without -c, output only the first of an equal run]'
- '(-z --zero-terminated)'{-z,--zero-terminated}'[end lines with 0 byte, not newline]'
- --help'[display help and exit]'
- --version'[output version information and exit]'
- '*:filename:_files'
- )
-
-_arguments -s $arguments
+_arguments -s -S \
+ '(-b --ignore-leading-blanks)'{-b,--ignore-leading-blanks}'[ignore leading blanks]' \
+ "$ordering"{-d,--dictionary-order}'[consider only blanks and alphanumeric characters]' \
+ '(-f --ignore-case)'{-f,--ignore-case}'[fold lower case to upper case characters]' \
+ "$ordering"{-g,--general-numeric-sort}'[compare according to general numeric value]' \
+ '(-i --ignore-nonprinting)'{-i,--ignore-nonprinting}'[consider only printable characters]' \
+ "$ordering"{-M,--month-sort}"[compare (unknown) < 'JAN' < ... < 'DEC']" \
+ "$ordering"{-h,--human-numeric-sort}'[compare human readable numbers (e.g., 2K 1G)]' \
+ "$ordering"{-n,--numeric-sort}'[compare according to string numerical value]' \
+ "$ordering"{-R,--random-sort}'[sort by random hash of keys]' \
+ '--random-source=[get random bytes from file]:file:_files' \
+ '(-r --reverse)'{-r,--reverse}'[reverse the result of comparisons]' \
+ "$ordering--sort=[sort according to ordering]:ordering:(general-numeric human-numeric month numeric random version)" \
+ "$ordering"{-V,--version-sort}'[sort version numbers]' \
+ '--batch-size=[maximum inputs to merge]:number' \
+ '(-c --check -C)'{-c,-C}'[check whether input is sorted; do not sort]' \
+ '(-c --check -C)--check=-[check whether input is sorted; do not sort]::bad line handling:(diagnose-first silent quiet)' \
+ '--compress-program=[specify program to compress temporary files with]:program:(gzip bzip2 lzop xz)' \
+ '--debug[annotate the of the line used to sort]' \
+ '--files0-from=[read input files from file]:file:_files' \
+ '(-k --key)'{-k+,--key=}'[start a key at POS1, end it as POS2 (origin 1)]:key' \
+ '(-m --merge)'{-m,--merge}'[merge already sorted files; do not sort]' \
+ '(-o --output)'{-o+,--output=}'[write result to file instead of standard output]:output file:_files' \
+ '(-s --stable)'{-s,--stable}'[preserve original order of lines with the same key]' \
+ '(-S --buffer-size)'{-S+,--buffer-size=}'[specify size for main memory buffer]:size' \
+ '(-t --field-separator)'{-t+,--field-separator=}'[specify field separator instead of non-blank to blank transition]:separator' \
+ \*{-T+,--temporary-directory=}'[specify directory for temporary files]:directory:_directories' \
+ '(-u --unique)'{-u,--unique}'[with -c, check for strict ordering; without -c, output only the first of an equal run]' \
+ '--parallel=[set number of sorts run concurrently]:number' \
+ '(-z --zero-terminated)'{-z,--zero-terminated}'[end lines with 0 byte, not newline]' \
+ '(- *)--help[display help and exit]' \
+ '(- *)--version[output version information and exit]' \
+ '*:file:_files'
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 7e85e2bb6..3e499b8d0 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -519,7 +519,7 @@ _ssh () {
fi
;;
file)
- if compset -P '*:'; then
+ if compset -P '[^./][^/]#:'; then
_remote_files -- ssh ${(kv)~opt_args[(I)-[FP1246]]/-P/-p} && ret=0
elif compset -P '*@'; then
suf=( -S '' )
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index 11d0b69e4..597f2325c 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -20,7 +20,7 @@ _svn () {
typeset -gHA _svn_cmds
if _cache_invalid svn-cmds || ! _retrieve_cache svn-cmds; then
_svn_cmds=(
- ${=${(f)${${"$(LC_ALL=C _call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
+ ${=${(f)${${"$(_comp_locale; _call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
)
_store_cache svn-cmds _svn_cmds
fi
@@ -41,14 +41,14 @@ _svn () {
if _cache_invalid svn-${cmd}-usage || \
! _retrieve_cache svn-${cmd}-usage;
then
- usage=${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"}:#usage:*}#usage:*$cmd] }
+ usage=${${(M)${(f)"$(_comp_locale; _call_program options svn help $cmd)"}:#usage:*}#usage:*$cmd] }
_store_cache svn-${cmd}-usage usage
fi
if _cache_invalid svn-${cmd}-usage || \
! _retrieve_cache svn-${cmd}-args;
then
args=(
- ${=${${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)(-##)([[:alpha:]]##) \[--([a-z-]##)\](:arg:)#/(--$match[3])$match[1]$match[2]$match[4] ($match[1]$match[2])--$match[3]$match[4]}
+ ${=${${${(M)${(f)"$(_comp_locale; _call_program options svn help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)(-##)([[:alpha:]]##) \[--([a-z-]##)\](:arg:)#/(--$match[3])$match[1]$match[2]$match[4] ($match[1]$match[2])--$match[3]$match[4]}
)
while (( idx=$args[(I)*--c(l|hangelist):arg:] )); do
args[(I)*--c(l|hangelist):arg:]=( \*{--cl,--changelist}':change list:_svn_changelists' )
@@ -157,7 +157,7 @@ _svnadmin () {
if [[ -n $state ]] && (( ! $+_svnadmin_cmds )); then
typeset -gHA _svnadmin_cmds
_svnadmin_cmds=(
- ${=${(f)${${"$(LC_ALL=C _call_program commands svnadmin help)"#l#*Available subcommands:}}}/(#s)[[:space:]]#(#b)([-a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
+ ${=${(f)${${"$(_comp_locale; _call_program commands svnadmin help)"#l#*Available subcommands:}}}/(#s)[[:space:]]#(#b)([-a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
)
fi
@@ -172,9 +172,9 @@ _svnadmin () {
if (( $#cmd )); then
curcontext="${curcontext%:*:*}:svnadmin-${cmd}:"
- usage=${${(M)${(f)"$(LC_ALL=C _call_program options svnadmin help $cmd)"}:#$cmd: usage:*}#$cmd: usage: svnadmin $cmd }
+ usage=${${(M)${(f)"$(_comp_locale; _call_program options svnadmin help $cmd)"}:#$cmd: usage:*}#$cmd: usage: svnadmin $cmd }
args=(
- ${=${${${(M)${(f)"$(LC_ALL=C _call_program options svnadmin help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}
+ ${=${${${(M)${(f)"$(_comp_locale; _call_program options svnadmin help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}
)
if [[ $usage == *REPOS_PATH* ]]; then
args+=( ":path:_files -/" )
@@ -319,7 +319,7 @@ _svn_props() {
_svn_changelists() {
local cls
- cls=( ${${${(M)${(f)"$(LC_ALL=C _call_program changelists svn status 2>/dev/null)"}:#--- Changelist*}%??}##*\'} )
+ cls=( ${${${(M)${(f)"$(_comp_locale; _call_program changelists svn status 2>/dev/null)"}:#--- Changelist*}%??}##*\'} )
compadd "$@" -a cls && return 0
}
diff --git a/Completion/Unix/Command/_systemd b/Completion/Unix/Command/_systemd
index c9fc38a5e..1aae4688b 100644
--- a/Completion/Unix/Command/_systemd
+++ b/Completion/Unix/Command/_systemd
@@ -121,11 +121,14 @@ _hosts_or_user_at_host()
"rescue:Enter system rescue mode"
"emergency:Enter system emergency mode"
"halt:Shut down and halt the system"
- "suspend:Suspend the system"
"poweroff:Shut down and power-off the system"
"reboot:Shut down and reboot the system"
"kexec:Shut down and reboot the system with kexec"
"exit:Ask for user instance termination"
+ "switch-root:Change to a different root file system"
+ "suspend:Suspend the system"
+ "hibernate:Hibernate the system"
+ "hibernate-sleep:Hibernate and suspend the system"
)
if (( CURRENT == 1 )); then
@@ -331,6 +334,13 @@ done
(( $+functions[_systemctl_link] )) || _systemctl_link() { _files }
+(( $+functions[_systemctl_switch-root] )) || _systemctl_switch-root()
+{
+ if (( CURRENT == 2 )); then
+ _directories
+ fi
+}
+
# no systemctl completion for:
# [STANDALONE]='daemon-reexec daemon-reload default dot dump
# emergency exit halt kexec list-jobs list-units
diff --git a/Completion/Unix/Command/_twisted b/Completion/Unix/Command/_twisted
index b3b242729..70cb89ecd 100644
--- a/Completion/Unix/Command/_twisted
+++ b/Completion/Unix/Command/_twisted
@@ -1,86 +1,33 @@
-#compdef trial conch mktap cftp tapconvert twistd ckeygen lore pyhtmlizer websetroot tap2deb tkmktap tkconch manhole tap2rpm
-
-# Copyright (c) 2005 Eric Mangold
-# Maintainer: Eric Mangold <teratorn@twistedmatrix.com>
-
-# This file is meant to be in your zsh function path. i.e. in one of those
-# directories listed in your $fpath variable.
+#compdef twistd trial conch cftp tapconvert ckeygen lore pyhtmlizer tap2deb tkconch manhole tap2rpm
#
-# e.g. /usr/local/share/zsh/site-functions/
+# This is the ZSH completion file for Twisted commands. It calls the current
+# command-line with the special "--_shell-completion" option which is handled
+# by twisted.python.usage. t.p.usage then generates zsh code on stdout to
+# handle the completions for this particular command-line.
#
-# It is responsible for passing completion control to the correct
-# completion function for the version of Twisted that is
-# currently in use.
+# 3rd parties that wish to provide zsh completion for commands that
+# use t.p.usage may copy this file and change the first line to reference
+# the name(s) of their command(s).
#
-# Goals:
-#
-# We want to detect any changes to PYTHONPATH since the last time we ran.
-# That way we can re-locate the completion functions so that we are sure
-# to be completing for the right version of Twisted.
-
-local dir old_fpath python_code run shebang
-
-function debug () {
- echo $@ >> /tmp/twisted_stub_debug
-}
-
-#debug "START _twisted_stub"
-
-function load_twisted_completions() {
- [[ -z $commands[twistd] ]] && echo 'ERROR: test command "twistd" not found in path' && return 1
- shebang=$(head -1 $commands[twistd])
- [[ $shebang != \#\!* ]] && echo 'ERROR: invalid shebang line for test script "twistd"' && return 1
- PYTHON=$shebang[3,-1] # strip #! off the shebang
- PYTHON=${PYTHON# *} # remove any spaces between #! and command
-
- #debug PYTHON $PYTHON:q
- python_code='
-import twisted, os.path
-dir = os.path.dirname(twisted.__file__)
-print os.path.join(dir, "python", "zsh")
-'
- dir=$(${=PYTHON} -c "$python_code")
- #debug "Trying to load twisted functions from $dir:q"
- if [[ -r $dir/_twistd ]]; then
- old_fpath=($fpath)
- fpath=( $dir $fpath )
- autoload +X _trial _conch _mktap _cftp _tapconvert _twistd _ckeygen
- autoload +X _lore _pyhtmlizer _websetroot _tap2deb _tkmktap _tkconch
- autoload +X _manhole _tap2rpm
- fpath=($old_fpath)
- else
- echo 'ERROR: Cannot find twisted completion function files in $dir:q'
- return 1
- fi
-}
-
-function twisted_run () {
- # run completion function for current command
- # the :t modifier strips off any leading pathname components
- eval _$words[1]:t
-}
-
-function twisted_save_load_run () {
- # save PYTHONPATH, load twisted completions, and run the completion
- # function for the current command
- load_twisted_completions && twisted_run && PYTHONPATH_last=$PYTHONPATH
-}
-
-
-if [[ -n $PYTHONPATH_last ]]; then
- #debug "PYTHONPATH_last is set to $PYTHONPATH_last"
- #check if it's the same as the last time we ran
- if [[ $PYTHONPATH == $PYTHONPATH_last ]]; then
- #debug "PYTHONPATH == PYTHONPATH_last"
- # it's the same, which means we've already loaded completion
- # functions and nothing has changed.
- twisted_run
- else
- twisted_save_load_run
- fi
+# This file is included in the official Zsh distribution as
+# Completion/Unix/Command/_twisted
+
+# redirect stderr to /dev/null otherwise deprecation warnings may get puked all
+# over the user's terminal if completing options for a deprecated command.
+# Redirect stderr to a file to debug errors.
+local cmd output
+cmd=("$words[@]" --_shell-completion zsh:$CURRENT)
+output=$("$cmd[@]" 2>/dev/null)
+
+if [[ $output == "#compdef "* ]]; then
+ # Looks like we got a valid completion function - so eval it to produce
+ # the completion matches.
+ eval $output
else
- twisted_save_load_run
+ echo "\nCompletion error running command:" ${(qqq)cmd}
+ echo -n "If output below is unhelpful you may need to edit this file and "
+ echo "redirect stderr to a file."
+ echo "Expected completion function, but instead got:"
+ echo $output
+ return 1
fi
-
-#debug "END _twisted_stub"
-#
diff --git a/Completion/Unix/Command/_vcsh b/Completion/Unix/Command/_vcsh
index 89588e4b2..47dbd9e69 100644
--- a/Completion/Unix/Command/_vcsh
+++ b/Completion/Unix/Command/_vcsh
@@ -1,18 +1,135 @@
#compdef vcsh
-_arguments \
- ':subcommand:((
- clone\:"clone from repo"
- help\:"display help"
- delete\:"delete repo"
- enter\:"Enter repo; spawn new \$SHELL"
- init\:"init & clone from repo"
- list\:"list all repos"
- list-tracked\:"list all files tracked by vcsh"
- list-tracked-by\:"list files tracked by a repo"
- rename\:"rename repo"
- run\:"run command on repo"
- setup\:"set up repo with recommended settings"
- write-gitignore\:"write .gitignore.d/foo via git ls-files"
- \<REPO\>\:"Run git command directly"
- ))'
+function __vcsh_repositories () {
+ local expl
+ local -a repos
+ repos=( ${(f)"$(command vcsh list)"} )
+ _describe -t repos 'repositories' repos
+}
+
+function __vcsh_not_implemented_yet () {
+ _message "Subcommand completion '${1#*-}': not implemented yet"
+}
+
+function _vcsh-clone () {
+ __vcsh_not_implemented_yet "$0" #TODO
+}
+
+function _vcsh-delete () {
+ (( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh-enter () {
+ (( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh-help () {
+ _nothing
+}
+
+function _vcsh-init () {
+ _nothing
+}
+
+function _vcsh-list () {
+ _nothing
+}
+
+function _vcsh-list-tracked () {
+ _nothing
+}
+
+function _vcsh-list-tracked-by () {
+ (( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh-pull () {
+ _nothing
+}
+
+function _vcsh-push () {
+ _nothing
+}
+
+function _vcsh-rename () {
+ (( CURRENT == 2 )) && __vcsh_repositories
+ (( CURRENT == 3 )) && _message "new repository name"
+ (( CURRENT > 3 )) && _nothing
+}
+
+function _vcsh-run () {
+ (( CURRENT == 2 )) && __vcsh_repositories
+ if (( CURRENT >= 3 )); then
+ words=( "${(@)words[3,-1]}" )
+ (( CURRENT -= 2 ))
+ _complete
+ fi
+}
+
+function _vcsh-upgrade () {
+ (( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh-version () {
+ _nothing
+}
+
+function _vcsh-which () {
+ _files
+}
+
+function _vcsh-write-gitignore () {
+ (( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh () {
+ local curcontext="${curcontext}"
+ local state vcshcommand
+ local -a args subcommands
+
+ subcommands=(
+ "clone:clone an existing repository"
+ "delete:delete an existing repository"
+ "enter:enter repository; spawn new <\$SHELL>"
+ "help:display help"
+ "init:initialize an empty repository"
+ "list:list all local vcsh repositories"
+ "list-tracked:list all files tracked by vcsh"
+ "list-tracked-by:list files tracked by a repository"
+ "pull:pull from all vcsh remotes"
+ "rename:rename a repository"
+ "run:run command with <\$GIT_DIR> and <\$GIT_WORK_TREE> set"
+ "upgrade:upgrade repository to currently recommended settings"
+ "version:print version information"
+ "which:find <substring> in name of any tracked file"
+ "write-gitignore:write .gitignore.d/<repo> via git ls-files"
+ )
+
+ args=(
+ '-c[source <file> prior to other configuration files]:config files:_path_files'
+ '-d[enable debug mode]'
+ '-v[enable verbose mode]'
+ '*:: :->subcommand_or_options_or_repo'
+ )
+
+ _arguments -C ${args} && return
+
+ if [[ ${state} == "subcommand_or_options_or_repo" ]]; then
+ if (( CURRENT == 1 )); then
+ _describe -t subcommands 'vcsh sub-commands' subcommands
+ __vcsh_repositories
+ else
+ vcshcommand="${words[1]}"
+ if ! (( ${+functions[_vcsh-$vcshcommand]} )); then
+ # There is no handler function, so this is probably the name
+ # of a repository. Act accordingly.
+ _dispatch git git
+ else
+ curcontext="${curcontext%:*:*}:vcsh-${vcshcommand}:"
+ _call_function ret _vcsh-${vcshcommand}
+ fi
+ fi
+ fi
+}
+
+_vcsh "$@"
diff --git a/Completion/Unix/Command/_wget b/Completion/Unix/Command/_wget
index 51d640d62..f709a0830 100644
--- a/Completion/Unix/Command/_wget
+++ b/Completion/Unix/Command/_wget
@@ -17,13 +17,14 @@ _arguments -C -s \
'(--input-file -i)'{--input-file=,-i+}'[specify input file]:file containing URLs:_files' \
'(--force-html -F)'{--force-html,-F}'[treat input file as html]' \
'(--base -B)'{--base=,-B+}'[prepend URL to relative links]:base URL:_urls' \
+ '--config=[specify config file]:config file:_files' \
'(--tries -t)'{--tries=,-t+}'[set number of retries]:number of retries' \
'--retry-connrefused[retry even if connection is refused]' \
'(--output-document -O)'{--output-document=,-O+}'[specify file to write documents to]:output file:_files' \
'(--continue -c)'{--continue,-c}'[continue getting an existing file]' \
- '--content-disposition[honor the Content-Disposition header when choosing local file names]' \
'--progress=[set progress gauge type]:gauge type:->gauge' \
'(--timestamping -N)'{--timestamping,-N}'[retrieve only files newer than existing]' \
+ "--no-use-server-timestamps[don't set the local file's timestamp by the one on the server]" \
'(--server-response -S)'{--server-response,-S}'[print server response]' \
"--spider[don't download anything]" \
'(--timeout -T)'{--timeout=,-T+}'[set all timeout values]:timeout (seconds)' \
@@ -40,11 +41,16 @@ _arguments -C -s \
'--limit-rate=[specify limit to download rate]:download rate limit' \
'--no-dns-cache[disable caching DNS lookups]' \
'--restrict-file-names=[restrict chars in file names to ones OS allows]:OS:->restrict' \
+ '--ignore-case[ignore case when matching files/directories]' \
'(-4 --inet4-only -6 --inet6-only)'{-4,--inet4-only}'[connect only to IPv4 addresses]' \
'(-4 --inet4-only -6 --inet6-only)'{-6,--inet6-only}'[connect only to IPv6 addresses]' \
'--prefer-family[connect first to addresses of specified family]:address family:(IPv6 IPv4 none)' \
'(--http-user --ftp-user)--user[set both ftp and http user]:user' \
'(--http-password --ftp-password)--password[set both ftp and http password]:password' \
+ '--no-iri[turn off IRI support]' \
+ '--local-encoding=[specify local encoding for IRIs]:encoding' \
+ '--remote-encoding=[specify default remote encoding]:encoding' \
+ '--unlink[remove file before clobber]' \
'(--force-directories -x)'{--force-directories,-x}'[force creation of directories]' \
'--protocol-directories[use protocol name in directories]' \
'(--directory-prefix -P)'{--directory-prefix=,-P+}'[specify prefix to save files to]:prefix:_files -/' \
@@ -52,7 +58,8 @@ _arguments -C -s \
'(--user)--http-user=:user' \
'(--password)--http-password=:password' \
'--no-cache[disallow server-cached data]' \
- '(--html-extension -E)'{--html-extension,-E}'[save all HTML documents with a .html extension]' \
+ '--default-page=[specify default page name, normally index.html]' \
+ '(--adjust-extension -E)'{--adjust-extension,-E}'[save all HTML/CSS documents with proper extensions]' \
"--ignore-length[ignore \`Content-Length' header field]" \
'*--header=:string' \
'--proxy-user=:user' \
@@ -61,12 +68,14 @@ _arguments -C -s \
'--save-headers[save http headers]' \
'(--user-agent -U)'{--user-agent=,-U+}'[specify user agent to identify as]:user-agent' \
'--no-http-keep-alive[disable HTTP keep-alive]' \
- '--no-cookies=[turn cookies off]' \
+ '--no-cookies[turn cookies off]' \
'--load-cookies=[specify file to load cookies from]:cookie file:_files' \
'--save-cookies=[specify file to save cookies to]:cookie file:_files' \
'--keep-session-cookies[load and save session cookies]' \
'--post-data=[use the POST method with specified data]:data to send' \
'--post-file=[use the POST method; sending contents of a file]:file:_files' \
+ '--content-disposition[honor the Content-Disposition header when choosing local file names]' \
+ "--auth-no-challenge[send basic HTTP authentication without first waiting for server's challenge]" \
'--secure-protocol=[choose secure protocol]:protocol:(SSLv2 SSLv3 TLSv1)' \
"--no-check-certificate=[don't check the server certificate]" \
'--certificate=[specify client certificate]:client certificate file:_files' \
@@ -89,7 +98,7 @@ _arguments -C -s \
'--delete-after' \
'(--convert-links -k)'{--convert-links,-k}'[convert links to be relative]' \
'(--backup-converted -K)'{--backup-converted,-K}'[backup files before conversion]' \
- '(--mirror -m -r -N -l)'{--mirror,-m}'[mirror (-r -N -l inf -nr)]' \
+ '(--mirror -m -r -N -l)'{--mirror,-m}'[mirror (-r -N -l inf --no-remove-listing)]' \
'(--page-requisites -p)'{--page-requisites,-p}'[get all images needed to display page]' \
'--strict-comments[turn on strict (SGML) handling of HTML comments]' \
'(--accept -A)'{--accept=,-A+}'[specify accepted extensions]:extensions' \
@@ -102,9 +111,10 @@ _arguments -C -s \
'(--span-hosts -H)'{--span-hosts,-H}'[span hosts]' \
'(--relative -L)'{--relative,-L}'[follow relative links only]' \
'(--include-directories -I)'{--include-directories=,-I+}'[include directories]:allowed directories' \
+ '--trust-server-names' \
'(--exclude-directories -X)'{--exclude-directories=,-X+}'[exclude directories]:excluded directories' \
+ '(-np --no-parent)'{-np,--no-parent}"[don't ascend to parent directory]" \
'--no-host-lookup' \
- '--no-parent' \
'--no-verbose' \
'--no-clobber' \
'--no-directories' \
diff --git a/Completion/Unix/Command/_xmlsoft b/Completion/Unix/Command/_xmlsoft
index ed5bfe7f7..67ba6c001 100644
--- a/Completion/Unix/Command/_xmlsoft
+++ b/Completion/Unix/Command/_xmlsoft
@@ -66,13 +66,14 @@ case $service in
'--recover[output what was parsable on broken XML documents]' \
'--huge[remove any internal arbitrary parser limits]' \
'--noent[substitute entity references by their value]' \
+ '--noenc[ignore any encoding specified inside the document]' \
"(--output -o)--noout[don't output the result tree]" \
'--path[provide a set of paths for resources]:paths:_files -/' \
'--load-trace[print trace of all external entites loaded]' \
'--nonet[refuse to fetch DTDs or entities over network]' \
+ '--nocompact[do not generate compact text nodes]' \
'--htmlout[output results as HTML]' \
'--nowrap[do not put HTML doc wrapper]' \
- '--nocompact[do not generate compact text nodes]' \
'--valid[validate the document in addition to std well-formed check]' \
'(--dtdvalid --relaxng --schema)--postvalid[do a posteriori validation, i.e after parsing]' \
'(--postvalid --relaxng --schema --dtdvalidfpi)--dtdvalid[do a posteriori validation against a given DTD]:DTD:_webbrowser' \
@@ -84,27 +85,28 @@ case $service in
'--compress[turn on gzip compression of output]' \
'--html[use the HTML parser]' \
'--xmlout[use the XML serializer when using --html]' \
+ '--nodefdtd[do not default HTML doctype]' \
'--push[use the push mode of the parser]' \
'--memory[parse from memory]' \
- '--maxmem[imits memory allocation]:bytes' \
+ '--maxmem[limit memory allocation]:bytes' \
'--nowarning[do not emit warnings from parser/validator]' \
'--noblanks[drop (ignorable?) blanks spaces]' \
'--nocdata[replace cdata section with text nodes]' \
'--format[reformat/reindent the input]' \
'--encode[output in the given encoding]:encoding:(${encoding[@]})' \
'--dropdtd[remove the DOCTYPE of the input docs]' \
+ "--pretty[pretty-print in a particular style]:style:((0\:don't\ pretty\ print 1\:reformat 2\:add\ whitespace))" \
'--c14n[save in W3C canonical format]' \
'--c14n11[save in W3C canonical format v1.1 (with comments)]' \
'--exc-c14n[save in W3C exclusive canonical format]' \
'--nsclean[remove redundant namespace declarations]' \
- '--testIO[test user I/O support]' \
'(--nocatalogs)--catalogs[use SGML catalogs]' \
'(--catalogs)--nocatalogs[deactivate all catalogs]' \
'--auto[generate a small doc on the fly]' \
'(--noxincludenode)--xinclude[do XInclude processing]' \
'(--xinclude)--noxincludenode[do XInclude processing but do not generate XInclude nodes]' \
- '--loaddtd[fetch external DTD]' \
'--nofixup-base-uris[do not fixup xml:base uris]' \
+ '--loaddtd[fetch external DTD]' \
'--dtdattr[loaddtd + populate the tree with inherited attributes]' \
'--stream[use the streaming interface to process very large files]' \
'--walker[create a reader and walk though the resulting doc]' \
@@ -116,7 +118,7 @@ case $service in
'--sax1[use the old SAX1 interfaces for processing]' \
'--sax[do not build a tree but work just at the SAX level]' \
'--oldxml10[use XML-1.0 parsing rules before the 5th edition]' \
- '--xpath[evaluate the XPath expression, inply --noout]:XPath expression:' \
+ '(--noout)--xpath[evaluate the XPath expression, implies --noout]:XPath expression' \
'*:XML file:_webbrowser' && return
;;
*XML_CATALOG_FILES*)
@@ -125,7 +127,7 @@ case $service in
_urls
return
fi
-
+
compset -S ':*'
_alternative \
'files:catalog file:_files' \
@@ -134,5 +136,3 @@ case $service in
esac
return 1
-
-