summaryrefslogtreecommitdiff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Utility/_call_program17
-rw-r--r--Completion/Base/Utility/_describe2
-rw-r--r--Completion/Base/Widget/_complete_debug2
-rw-r--r--Completion/Linux/Command/_btrfs3
-rw-r--r--Completion/Linux/Command/_cryptsetup175
-rw-r--r--Completion/Unix/Command/_augeas58
-rw-r--r--Completion/Unix/Command/_dvi2
-rw-r--r--Completion/Unix/Command/_git70
-rw-r--r--Completion/Unix/Command/_graphicsmagick2
-rw-r--r--Completion/Unix/Command/_imagemagick2
-rw-r--r--Completion/Unix/Command/_notmuch3
-rw-r--r--Completion/Unix/Command/_perforce15
-rw-r--r--Completion/Unix/Command/_quilt425
-rw-r--r--Completion/Unix/Command/_stgit11
-rw-r--r--Completion/Unix/Command/_sysctl9
-rwxr-xr-xCompletion/Unix/Type/_mime_types4
-rw-r--r--Completion/Unix/Type/_net_interfaces27
-rw-r--r--Completion/Unix/Type/_path_files22
-rw-r--r--Completion/X/Command/_mplayer2
-rw-r--r--Completion/Zsh/Command/_setopt22
-rw-r--r--Completion/Zsh/Command/_typeset15
-rw-r--r--Completion/Zsh/Command/_unsetopt10
22 files changed, 496 insertions, 402 deletions
diff --git a/Completion/Base/Utility/_call_program b/Completion/Base/Utility/_call_program
index b038a80bc..b65764827 100644
--- a/Completion/Base/Utility/_call_program
+++ b/Completion/Base/Utility/_call_program
@@ -1,6 +1,13 @@
#autoload +X
-local tmp
+local tmp err_fd=-1
+
+if (( ${debug_fd:--1} > 2 ))
+then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is log file
+else exec {err_fd}>/dev/null
+fi
+
+{ # Begin "always" block
if zstyle -s ":completion:${curcontext}:${1}" command tmp; then
if [[ "$tmp" = -* ]]; then
@@ -10,4 +17,10 @@ if zstyle -s ":completion:${curcontext}:${1}" command tmp; then
fi
else
eval "$argv[2,-1]"
-fi
+fi 2>&$err_fd
+
+} always {
+
+exec {err_fd}>&-
+
+}
diff --git a/Completion/Base/Utility/_describe b/Completion/Base/Utility/_describe
index f899b0ad0..1a9f52f5d 100644
--- a/Completion/Base/Utility/_describe
+++ b/Completion/Base/Utility/_describe
@@ -96,7 +96,7 @@ while _tags; do
fi
if [[ -n $_mats ]]; then
- compadd "$_opts[@]" "${(@)_expl:/-J/-2V}" -D $_strs - \
+ compadd "$_opts[@]" "${(@)_expl:/-J/-2V}" -D $_strs -O $_mats - \
"${(@)${(@M)${(@P)_mats}##([^:\\]|\\?)##}//\\(#b)(?)/$match[1]}"
else
compadd "$_opts[@]" "${(@)_expl:/-J/-2V}" -D $_strs - \
diff --git a/Completion/Base/Widget/_complete_debug b/Completion/Base/Widget/_complete_debug
index eff0f8e28..604486376 100644
--- a/Completion/Base/Widget/_complete_debug
+++ b/Completion/Base/Widget/_complete_debug
@@ -12,6 +12,8 @@ integer debug_fd=-1
exec {debug_fd}>&2 2>| $tmp
fi
+ local -a debug_indent; debug_indent=( '%'{3..20}'(e. .)' )
+ local PROMPT4 PS4="${(j::)debug_indent}+%N:%i> "
setopt xtrace
: $ZSH_NAME $ZSH_VERSION
${1:-_main_complete}
diff --git a/Completion/Linux/Command/_btrfs b/Completion/Linux/Command/_btrfs
index c8f87ef70..77deeefcb 100644
--- a/Completion/Linux/Command/_btrfs
+++ b/Completion/Linux/Command/_btrfs
@@ -125,7 +125,8 @@ while (( $#state )); do
args+=(
'-r[readonly snapshot]'
'*-i[assign to qgroup]:qgroup: _message "qgroup"'
- '1:snapshot:_files -/'
+ '1:source directory:_files -/'
+ '2:snapshot name or destination:_files -/'
)
;;
subvolume:list)
diff --git a/Completion/Linux/Command/_cryptsetup b/Completion/Linux/Command/_cryptsetup
index 3519336e8..0e7a5d37e 100644
--- a/Completion/Linux/Command/_cryptsetup
+++ b/Completion/Linux/Command/_cryptsetup
@@ -1,103 +1,82 @@
#compdef cryptsetup
-## completion for cryptsetup 1.3.0, based on cryptsetup(1)
-function _cryptsetup_action {
- typeset -a actions
- actions=(
- 'create:create a mapping'
- 'remove:remove an existing mapping'
- 'status:report mapping status'
- 'resize:resize an active mapping'
- 'luksFormat:Initialize a LUKS partition'
- 'luksOpen:Open LUKS partition'
- 'luksClose:remove an existing mapping'
- 'luksSuspend:suspend active device'
- 'luksResume:resume suspended device'
- 'luksAddKey:add a new key'
- 'luksRemoveKey:remove a key'
- 'luksChangeKey:change a key'
- 'luksKillSlot:wipe key from slot'
- 'luksUUID:print/change device UUID'
- 'isLuks:check if device is a LUKS partition'
- 'luksDump:dump header information'
- 'luksHeaderBackup:store binary backup of headers'
- 'luksHeaderRestore:restore header backup'
- )
- _describe action actions
-}
+local curcontext="$curcontext" ret=1
+local -a actions state line expl
-function _cryptsetup_device {
- typeset expl
- _wanted file expl device \
- _files
-}
+_arguments \
+ '(-v --verbose)'{-v,--verbose}'[enable verbose mode]' \
+ '--debug[enable debug mode]' \
+ '(-h --hash)'{-h,--hash}'[hash algorithm]:hash algorithm' \
+ '(-c --cipher)'{-c,--cipher}'[set cipher]:cipher specification' \
+ '(-y --verify-passphrase)'{-y,--verify-passphrase}'[query for password twice]' \
+ '(-d --key-file)'{-d,--key-file}'[set keyfile]:key file:_files' \
+ '(-l --keyfile-size)'{-l,--keyfile-size}'[set keyfile size]:size (bytes)' \
+ '--new-keyfile-size[set new keyfile size (luksAddKey)]:size (bytes)' \
+ '--master-key-file[set master key]:key file:_files' \
+ '--dump-master-key[dump luks master key]' \
+ '(--use-urandom)--use-random[use /dev/random to generate volume key]' \
+ '(--use-random)--use-urandom[use /dev/urandom to generate volume key]' \
+ '(-S --key-slot)'{-S,--key-slot}'[select key slot]:key slot' \
+ '(-s --key-size)'{-s,--key-size}'[set key size]:size (bits)' \
+ '(-b --size)'{-b,--size}'[force device size]:sectors' \
+ '(-o --offset)'{-o,--offset}'[set start offset]:sectors' \
+ '(-p --skip)'{-p,--skip}'[data to skip at beginning]:sectors' \
+ '--readonly[set up read-only mapping]' \
+ '(-i --iter-time)'{-i,--iter-time}'[set password processing duration]:duration (milliseconds)' \
+ '(-q --batch-mode)'{-q,--batch-mode}'[do not ask for confirmation]' \
+ '(-t --timeout)'{-t,--timeout}'[set password prompt timeout]:timeout (seconds)' \
+ '(-T --tries)'{-T,--tries}'[set maximum number of retries]:number of retries' \
+ '--align-payload[set payload alignment]:sectors' \
+ '--uuid[set device UUID]:uuid' \
+ '(- : *)--version[show version information]' \
+ ':action:->actions' \
+ '*::arguments:->action-arguments' && ret=0
-function _cryptsetup_mapping {
- typeset expl
- _wanted file expl 'mapping name' \
- _path_files -W /dev/mapper
-}
+case $state in
+ actions)
+ actions=(
+ 'create:create a mapping'
+ 'remove:remove an existing mapping'
+ 'status:report mapping status'
+ 'resize:resize an active mapping'
+ 'luksFormat:initialize a LUKS partition'
+ 'luksOpen:open LUKS partition'
+ 'luksClose:remove an existing mapping'
+ 'luksSuspend:suspend active device'
+ 'luksResume:resume suspended device'
+ 'luksAddKey:add a new key'
+ 'luksRemoveKey:remove a key'
+ 'luksChangeKey:change a key'
+ 'luksKillSlot:wipe key from slot'
+ 'luksUUID:print/change device UUID'
+ 'isLuks:check if device is a LUKS partition'
+ 'luksDump:dump header information'
+ 'luksHeaderBackup:store binary backup of headers'
+ 'luksHeaderRestore:restore header backup'
+ )
+ _describe action actions && ret=0
+ ;;
+ action-arguments)
+ local -a args
+ local mapping=':mapping:_path_files -W /dev/mapper'
+ local device=':device:_files'
+ case ${words[1]} in
+ create) args=( $mapping $device );;
+ luksKillSlot) args=( $device ':key slot number' );;
+ luksOpen) args=( $device $mapping );;
+ remove|status|resize|luksClose|luksSuspend|luksResume) args=( $mapping );;
+ luks(AddKey|RemoveKey|DelKey|UUID|Dump)|isLuks) args=( $device );;
+ luks(Format|AddKey|RemoveKey|ChangeKey))
+ args=( $device ':key file:_files' )
+ ;;
+ luksHeader*) args=( $device '--header-backup-file:file:_files' );;
+ *)
+ _default
+ return
+ ;;
+ esac
+ _arguments $args && ret=0
+ ;;
+esac
-function _cryptsetup_arguments {
-
- case ${words[1]} in
-
- create)
- _arguments ':mapping:_cryptsetup_mapping' ':device:_cryptsetup_device'
- ;;
-
- remove|status|resize|luksClose|luksSuspend|luksResume)
- _arguments ': :_cryptsetup_mapping'
- ;;
-
- luks(AddKey|RemoveKey|DelKey|UUID|Dump)|isLuks)
- _arguments ': :_cryptsetup_device'
- ;;
-
- luks(Format|AddKey|RemoveKey|ChangeKey))
- _arguments ': :_cryptsetup_device' ':key file:_files'
- ;;
-
- luksKillSlot)
- _arguments ': :_cryptsetup_device' ':key slot number'
- ;;
-
- luksOpen)
- _arguments ': :_cryptsetup_device' ': :_cryptsetup_mapping'
- ;;
-
- esac
-}
-
-function _cryptsetup {
- _arguments \
- '(-v --verbose)'{-v,--verbose}'[enable verbose mode]' \
- '--debug[enable debug mode]' \
- '(-h --hash)'{-h,--hash}'[hash algorithm]:hash algorithm' \
- '(-c --cipher)'{-c,--cipher}'[set cipher]:cipher specification' \
- '(-y --verify-passphrase)'{-y,--verify-passphrase}'[query for password twice]' \
- '(-d --key-file)'{-d,--key-file}'[set keyfile]:key file:_files' \
- '(-l --keyfile-size)'{-l,--keyfile-size}'[set keyfile size]:bytes' \
- '--new-keyfile-size[set new keyfile size (luksAddKey)]:bytes' \
- '--master-key-file[set master key]:key file:_files' \
- '--dump-master-key[dump luks master key]' \
- '(--use-urandom)--use-random[use /dev/random to generate volume key]' \
- '(--use-random)--use-urandom[use /dev/urandom to generate volume key]' \
- '(-S --key-slot)'{-S,--key-slot}'[select key slot]:key slot' \
- '(-s --key-size)'{-s,--key-size}'[set key size]:bits' \
- '(-b --size)'{-b,--size}'[force device size]:sectors' \
- '(-o --offset)'{-o,--offset}'[set start offset]:sectors' \
- '(-p --skip)'{-p,--skip}'[data to skip at beginning]:sectors' \
- '--readonly[set up read-only mapping]' \
- '(-i --iter-time)'{-i,--iter-time}'[set password processing duration]:milliseconds' \
- '(-q --batch-mode)'{-q,--batch-mode}'[do not ask for confirmation]' \
- '(-t --timeout)'{-t,--timeout}'[set password prompt timeout]:seconds' \
- '(-T --tries)'{-T,--tries}'[set maximum number of retries]:maximum retries' \
- '--align-payload[set payload alignment]:sectors' \
- '--uuid[set device UUID]:uuid' \
- '--version[show version information]' \
- ':action:_cryptsetup_action' \
- '*::arguments:_cryptsetup_arguments'
-}
-
-_cryptsetup "$@"
+return ret
diff --git a/Completion/Unix/Command/_augeas b/Completion/Unix/Command/_augeas
new file mode 100644
index 000000000..622fa3467
--- /dev/null
+++ b/Completion/Unix/Command/_augeas
@@ -0,0 +1,58 @@
+#compdef augtool
+
+local curcontext="$curcontext" state line expl ret=1
+local -A opt_args
+
+_arguments -C -s \
+ '(-c --typecheck)'{-c,--typecheck}'[perform type checking on lenses]' \
+ '(-b --backup)'{-b,--backup}'[preserve original files with .augsave extension]' \
+ '(-n --new)'{-n,--new}'[leave files untouched but save changes with a .augnew extension]' \
+ '(-r --root)'{-r,--root=}'[specify filesystem root]:root directory:_files -/' \
+ \*{-I+,--include=}'[add directory containing lenses to search path]:directory:_files -/' \
+ '(-f --file *)'{-f+,--file=}'[read commands from specified file]:file:_files' \
+ '(-i --interactive)'{-i,--interactive}'[read commands from the terminal]' \
+ '(-e --echo)'{-e,--echo}'[echo commands read from a file or stdin]' \
+ '(-s --autosave)'{-s,--autosave}'[automatically save at the end of instructions]' \
+ '(-S --nostdinc)'{-S,--nostdinc}'[do not search the builtin default directories for modules]' \
+ '(-L --noload)'{-L,--noload}'[do not load any files into the tree on startup]' \
+ '(-A --noautoload)'{-A,--noautoload}'[do not autoload modules from the search path]' \
+ '--span[load span positions for nodes related to a file]' \
+ '(- *)--version[print version information]' \
+ '(-)'{-h,--help}'[print help information]' \
+ '*:: :->subcommands' && ret=0
+
+[[ -z $state ]] && return ret
+
+if [[ CURRENT -eq 1 || $words[1] == help ]]; then
+ local -a subcmds
+ subcmds=( ${${${(f)"$(_call_program subcommands augtool help 2>/dev/null)"}[2,-2]## #}// #- /:} )
+ _describe -t subcommands "augtool command" subcmds && ret=0
+ return ret
+fi
+
+_tags paths
+while _tags; do
+ if _requested paths; then
+ local subcmd="$words[1]"
+ curcontext="${curcontext%:*}-${subcmd}:"
+ if compset -P '/files/'; then
+ _all_labels paths expl path _path_files -W / && ret=0
+ elif compset -P '/augeas/'; then
+ compset -P '*/'
+ local files
+ files=( ${${(f)"$(_call_program path augtool ls ${words[CURRENT]%/*} 2>/dev/null)"}% = *} )
+ while _next_label paths expl path; do
+ compadd "$expl[@]" -- ${files:#*/} && ret=0
+ compadd "$expl[@]" -S '' -- ${(M)files:#*/} && ret=0
+ done
+ else
+ local -a suf
+ suf=(-S '')
+ compset -S '/*' || suf=( -S / )
+ _all_labels paths expl path compadd -P/ "$suf[@]" files augeas && ret=0
+ fi
+ fi
+ (( ret )) || break
+done
+
+return ret
diff --git a/Completion/Unix/Command/_dvi b/Completion/Unix/Command/_dvi
index c01792978..6576a84d9 100644
--- a/Completion/Unix/Command/_dvi
+++ b/Completion/Unix/Command/_dvi
@@ -1,4 +1,4 @@
-#compdef dvips dvibook dviconcat dvicopy dvidvi dviselect dvitodvi dvitype
+#compdef dvips dvibook dviconcat dvicopy dvidvi dvipdf dviselect dvitodvi dvitype
local expl args
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b1f411a5e..c4e386b15 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -104,6 +104,8 @@ _git-am () {
# undocumented (and not implemented here).
_arguments -S \
'(-s --signoff)'{-s,--signoff}'[add Signed-off-by: line to the commit message]' \
+ '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \
+ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \
'(-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]' \
@@ -508,6 +510,8 @@ _git-cherry-pick () {
'(-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 --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \
+ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \
'*'{-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]' \
@@ -663,6 +667,7 @@ _git-commit () {
'--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"
+ scissors\:"same as whitespace but cut from scissor line"
default\:"act as '\''strip'\'' if the message is to be edited and as '\''whitespace'\'' otherwise"))' \
'(-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]' \
@@ -677,7 +682,8 @@ _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' \
+ '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \
+ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \
'(-a --all --interactive -o --only -i --include *)--interactive[interactively update paths in the index file]' \
'*: :__git_ignore_line_inside_arguments __git_changed_files' \
- '(message)' \
@@ -870,8 +876,9 @@ _git-format-patch () {
'*--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]' \
+ '( --no-signature --signature-file)--signature=[add a signature]:signature' \
+ '(--signature --signature-file)--no-signature[do not add a signature]' \
+ '(--signature --no-signature )--signature-file=[use contents of file as 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]' \
@@ -1317,6 +1324,8 @@ _git-rebase () {
'--keep-empty[keep empty commits in the result]' \
'(- :)--skip[skip the current patch]' \
'(-m --merge)'{-m,--merge}'[use merging strategies to rebase]' \
+ '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \
+ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \
'*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' \
'*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]' \
'(-q --quiet -v --verbose --stat -n --no-stat)'{-q,--quiet}'[suppress all output]' \
@@ -1349,6 +1358,7 @@ _git-reset () {
_arguments -w -C -s \
'( --mixed --hard --merge --keep -p --patch -- *)--soft[do not touch the index file nor the working tree]' \
'(--soft --hard --merge --keep -p --patch -- *)--mixed[reset the index but not the working tree (default)]' \
+ '(--soft --hard --merge --keep -p --patch -- *)-N[keep --intent-to-add entries in the index]' \
'(--soft --mixed --merge --keep -p --patch -- *)--hard[match the working tree and index to the given tree]' \
'(--soft --mixed --hard --keep -p --patch -- *)--merge[reset out of a conflicted merge]' \
'(--soft --mixed --hard --merge -p --patch -- *)--keep[like --hard, but keep local working tree changes]' \
@@ -1382,6 +1392,8 @@ _git-revert () {
'(-m --mainline)'{-m+,--mainline=}'[pick which parent is mainline]:parent number' \
'(-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]' \
+ '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \
+ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \
': :__git_commits'
}
@@ -1752,11 +1764,13 @@ _git-tag () {
'*:: :__git_ignore_line_inside_arguments __git_tags' \
- listing \
'-n+[limit line output of annotation]: :__git_guard_number "limit"' \
- '-l[list tags matching pattern]' \
+ '(-l --list)'{-l,--list}'[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' \
+ '--sort=[specify how the tags should be sorted]:mode:((refname\:"lexicographic order"
+ version\\\:refname\:"tag names are treated as version numbers"))' \
'::pattern' \
- verification \
'-v[verifies gpg signutare of tags]' \
@@ -1890,7 +1904,7 @@ _git-config () {
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.deltaBaseCacheLimit:'maximum size of cache for base objects:maximum base objects cache size:->bytes:96m'
core.bigFileThreshold:'maximum size of files to compress:maximum compress size:->bytes:512m'
core.excludesfile:'additional file to use for exclusion:excludes file:_files'
core.askpass:'program to use for asking for passwords:password command:_path_commands'
@@ -1898,7 +1912,7 @@ _git-config () {
core.pager:'pager to use for paginating output:pager:_path_commands'
core.whitespace:'list of common whitespace problems to notice::->core.whitespace'
core.fsyncobjectfiles:'fsync() when writing object files::->bool:false'
- core.preloadindex:'use parallel index preload for operations like git diff::->bool:false'
+ core.preloadindex:'use parallel index preload for operations like git diff::->bool:true'
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'
@@ -1969,6 +1983,7 @@ _git-config () {
color.status.nobranch:'color of no-branch warning::->color'
color.ui:'color output of capable git commands::->color-bool:auto'
commit.cleanup:'default --cleanup option::->commit.cleanup:default'
+ commit.gpgsign:'always GPG-sign commits::->bool:false'
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'
@@ -2017,6 +2032,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.aggressiveDepth:'maximum delta depth:maximum delta depth::->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'
@@ -2077,6 +2093,7 @@ _git-config () {
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.fullname:'enable --full-name option by default::->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'
@@ -2161,7 +2178,7 @@ _git-config () {
'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.defaultToUpstream:'merge the upstream branches configured for the current branch by default::->bool:false'
+ merge.defaultToUpstream:'merge the upstream branches configured for the current branch by default::->bool:true'
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'
@@ -2192,10 +2209,11 @@ _git-config () {
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.ff:'accept fast-forwards only::->bool:false'
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::->pull.rebase: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:matching'
+ push.default:'action git push should take if no refspec is given::->push.default:simple'
rebase.stat:'show a diffstat of what changed upstream since last rebase::->bool:false'
rebase.autosquash:'autosquash by default::->bool:false'
rebase.autostash:'autostash by default::->bool:false'
@@ -2311,6 +2329,7 @@ _git-config () {
'svn-remote.*.pushurl:URL to push to::_urls'
'svn-remote.*.branches:branch mappings:branch mapping:->string'
'svn-remote.*.tags:tag mappings:tag mapping:->string'
+ tag.sort:'Default sorting method:->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'
@@ -2319,6 +2338,7 @@ _git-config () {
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'
+ uploadarchive.allowUnreachable:'allow git-upload-archive to accept an archive requests that ask for unreachable objects::->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'
@@ -2516,6 +2536,7 @@ _git-config () {
tar:'git tar-tree options'
transfer:'options controlling transfers'
uploadpack:'git upload-pack options'
+ uploadarchive:'git upload-archive options'
url:'URL prefixes'
user:'options controlling user identity'
web:'web options'
@@ -3219,6 +3240,8 @@ _git-repack () {
(( $+functions[_git-replace] )) ||
_git-replace () {
_arguments -w -S -s \
+ '--edit[edit existing object as base a starting point]' \
+ '--graft[rewrite the parents of a commit]' \
'(- *)-f[overwrite existing replace ref]' \
'(- 2)-d[delete existing replace refs]' \
'(- : *)-l[list replace refs]:pattern' \
@@ -3530,6 +3553,13 @@ _git-show-branch () {
return ret
}
+(( $+functions[_git-verify-commit] )) ||
+_git-verify-commit () {
+ _arguments -w -S -s \
+ '(-v --verbose)'{-v,--verbose}'[print the contents of the commit object before validating it]' \
+ '*: :__git_commits'
+}
+
(( $+functions[_git-verify-tag] )) ||
_git-verify-tag () {
_arguments -w -S -s \
@@ -3654,6 +3684,8 @@ _git-send-email () {
'--annotate[review and edit each patch before sending it]' \
'--bcc=[Bcc: value for each email]: :_email_addresses' \
'--cc=[starting Cc: value for each email]: :_email_addresses' \
+ '--to-cover[Copy the To: list from the first file to the rest]' \
+ '--cc-cover[Copy the Cc: list from the first file to the rest]' \
'--compose[edit introductory message for patch series]' \
'--from=[specify sender]:email address:_email_addresses' \
'--in-reply-to=[specify contents of first In-Reply-To header]:message-id' \
@@ -3683,7 +3715,7 @@ _git-send-email () {
'(--suppress-from )--no-suppress-from[add the From: address to the Cc: list]' \
'( --no-thread)--thread[set In-Reply-To: and References: headers]' \
'(--thread )--no-thread[do not set In-Reply-To: and References: headers]' \
- '--confirm[specify type of confirmation required before sending]: :__git_sendemail_confirm' \
+ '--confirm[specify type of confirmation required before sending]: :__git_sendemail_confirm_values' \
'--dry-run[do everything except actually sending the emails]' \
'( --no-format-patch)--format-patch[interpret ambiguous arguments as format-patch arguments]' \
'(--format-patch )--no-format-patch[interpret ambiguous arguments file-name arguments]' \
@@ -3954,13 +3986,14 @@ _git-apply () {
_arguments -w -S -s \
$apply_options \
+ '(--index --cached --reject)'{-3,--3way}'[fall back on 3-way merge if patch fails]' \
'--stat[output diffstat for input (turns off "apply")]' \
'--numstat[same as --stat but in decimal notation and complete pathnames (turns off "apply")]' \
'--summary[output summary of git-diff extended headers (turns off "apply")]' \
'--check[check if patches are applicable (turns off "apply")]' \
'( --cached)--index[make sure that patch is applicable to index]' \
'(--index )--cached[apply patches without touching working tree]' \
- '--build-face-ancestor[build temporary index for blobs with ambiguous origin]:index:_files' \
+ '--build-fake-ancestor[build temporary index for blobs with ambiguous origin]:index:_files' \
'(-R --reverse)'{-R,--reverse}'[apply patches in reverse]' \
'-z[use NUL termination on output]' \
'--unidiff-zero[disable unified-diff-context check]' \
@@ -5049,6 +5082,7 @@ _git_commands () {
rerere:'reuse recorded resolution of conflicted merges'
rev-parse:'pick out and massage parameters for other git commands'
show-branch:'show branches and their commits'
+ verify-commit:'check GPG signature of commits'
verify-tag:'check GPG signature of tags'
whatchanged:'show commit-logs and differences they introduce')
@@ -6135,7 +6169,8 @@ __git_setup_revision_options () {
'--parents[display parents of commit]'
'--children[display children of commit]'
'--left-right[mark which side of symmetric diff commit is reachable from]'
- '--graph[display graphical representation of commit history]'
+ '(--show-linear-break )--graph[display graphical representation of commit history]'
+ '( --graph)--show-linear-break=[show a barrier between commits from different branches]:barrier'
'--count[display how many commits would have been listed]'
'(-n --max-count)'{-n+,--max-count=}'[maximum number of commits to display]: :__git_guard_number'
'--skip=[skip given number of commits before output]: :__git_guard_number'
@@ -6222,6 +6257,8 @@ __git_setup_merge_options () {
'( --no-squash)--squash[merge, but do not commit]'
'(--squash )--no-squash[merge and commit]'
'--ff-only[refuse to merge unless HEAD is up to date or merge can be resolved as a fast-forward]'
+ '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \
+ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \
'*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies'
'*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]'
'(--verify-signatures)--verify-signatures[verify the commits being merged or abort]'
@@ -6429,6 +6466,7 @@ __git_diff-or-merge-tools () {
vimdiff
gvimdiff
vimdiff2
+ vimdiff3
gvimdiff2
emerge
ecmerge
@@ -6560,9 +6598,13 @@ _git() {
if (( CURRENT > 2 )); then
local -a aliases
local -A git_aliases
- # TODO: Should use -z here, but I couldn't get it to work.
- aliases=(${(f)${${${(f)"$(_call_program aliases git config --get-regexp '\^alias\.')"}#alias.}/ /$'\n'}/(#e)/$'\n'})
- (( $#aliases % 2 == 0 )) && git_aliases=($aliases)
+ local k v
+ aliases=(${(0)"$(_call_program aliases git config -z --get-regexp '\^alias\.')"})
+ for a in ${aliases}; do
+ k="${${a/$'\n'*}/alias.}"
+ v="${a#*$'\n'}"
+ git_aliases[$k]="$v"
+ done
if (( $+git_aliases[$words[2]] && !$+commands[git-$words[2]] && !$+functions[_git-$words[2]] )); then
local -a tmpwords expalias
diff --git a/Completion/Unix/Command/_graphicsmagick b/Completion/Unix/Command/_graphicsmagick
index d18ffbc7f..9306acd9c 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:xcf:xwd:xbm:xpm:yuv
+formats=jpg:jpeg:jp2:j2k:jpc:jpx:jpf: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/_imagemagick b/Completion/Unix/Command/_imagemagick
index 5876adc47..115cb01e4 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:xcf:xwd:xbm:xpm:yuv
+formats=jpg:jpeg:jp2:j2k:jpc:jpx:jpf: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/_notmuch b/Completion/Unix/Command/_notmuch
index 0c23aa5f6..b576d2b29 100644
--- a/Completion/Unix/Command/_notmuch
+++ b/Completion/Unix/Command/_notmuch
@@ -13,6 +13,9 @@ _notmuch_commands()
'dump:creates a plain-text dump of the tags of each message'
'restore:restores the tags from the given file'
'help:show details on a command'
+ 'compact:compact the notmuch database'
+ 'config:access the notmuch configuration file'
+ 'count:count messages matching the given search terms'
)
_describe -t command 'command' notmuch_commands
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index 839870211..db91e11af 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -1231,10 +1231,15 @@ _perforce_files() {
# "subdirs:subdirectory search:_perforce_subdirs"
)
_alternative $altfiles
- elif [[ -n $unmaintained && -z $dodirs ]]; then
- # a la _cvs_nonentried_files: directories are never maintained,
- # so skip 'em. Unmaintained files can't be integrated, opened
- # or resolved, so treat as exclusive (just as well, since
+ elif [[ -n $unmaintained ]]; then
+ # As directories are always umaintained, but may contain files
+ # we want to add, we'll always complete directories here. That's
+ # neater than the alternative of excluding them here and requesting
+ # them separately in the caller. The only client for this
+ # branch is currently 'p4 add'.
+ #
+ # Unmaintained files can't be integrated, opened
+ # or resolved, so treat as exclusive to other options (just as well, since
# this bit's messy).
local MATCH MBEGIN MEND
local -a omitpats
@@ -1253,7 +1258,7 @@ _perforce_files() {
[[ $#omitpats -eq 1 && $omitpats[1] = '' ]] && omitpats=()
if (( ${#omitpats} )); then
- _path_files -g "*~(*/|)(${(j:|:)~omitpats})(D.)"
+ _path_files -g "*~(*/|)(${(j:|:)~omitpats})(D)"
else
_path_files
fi
diff --git a/Completion/Unix/Command/_quilt b/Completion/Unix/Command/_quilt
index 2ceb2ffaa..76dda222f 100644
--- a/Completion/Unix/Command/_quilt
+++ b/Completion/Unix/Command/_quilt
@@ -1,249 +1,206 @@
#compdef quilt
-local -a tmp
-local rc
+local curcontext="$curcontext" state line
+local help="(- : *)-h[show help information]"
+local verbose='(-h)-v[verbose, more user friendly output]'
+local color='(-h)--color=[use syntax coloring]:color:(always auto never)'
+local pstyle='(-h)-p+[select patch style]:patch style:((0\:exclude\ top-level\ directory 1\:use\ .orig\ on\ top-level\ directory ab\:use\ a\ or\ b\ as\ top-level\ directory))'
+local -a pform rcfile
+pform=(
+ '(-U -c -C -h)-u[create a unified diff]'
+ '(-u -c -C -h)-U+[create a unified diff with num lines of context]:lines'
+ '(-u -U -C -h)-c[create a context diff]'
+ '(-u -U -c -h)-C+[create a context diff with num lines of context]:lines'
+)
+typeset -A opt_args
-_quilt_applied () {
- tmp=( ${(f)"$(quilt applied 2>&1)"} )
- rc=$?
- if (( rc == 0 )); then
- _wanted -V 'applied patches' expl 'patch' compadd "${tmp[@]}"
- else
- _message "No applied patches"
- fi
+_quilt_applied() {
+ local expl
+ _wanted -V patches expl patch compadd \
+ ${(f)"$(_call_program patches quilt $rcfile applied)"}
}
-_quilt_series () {
- _wanted -V 'patches' expl 'patch' compadd ${(f)"$(quilt series)"}
+_quilt_series() {
+ local expl
+ _wanted -V patches expl 'patch' compadd \
+ ${(f)"$(_call_program patches quilt $rcfile series)"}
}
-_quilt_unapplied () {
- tmp=( ${(f)"$(quilt unapplied 2>&1)"} )
- rc=$?
- if (( rc == 0 )); then
- _wanted -V 'unapplied patches' expl 'patch' compadd "${tmp[@]}"
- else
- _message "No unapplied patches"
- fi
+_quilt_unapplied() {
+ local expl
+ _wanted -V patches expl 'unapplied patch' compadd \
+ ${(f)"$(_call_program patches quilt $rcfile unapplied)"}
}
-_arguments \
- '--trace[Runs the command in bash trace mode]' \
- '--quiltrc[Use the specified configuration file]:files:_files' \
- '--version[Print the version number and exit]' \
+_arguments $help \
+ '--trace[run the command in bash trace mode]' \
+ '--quiltrc=[use the specified configuration file]:files:_files' \
+ '--version[print the version number and exit]' \
':quilt command:(add annotate applied delete diff edit files fold fork graph
grep header import mail new next patches pop previous push refresh remove
rename revert series setup snapshot top unapplied upgrade)' \
- '*::subcmd:->subcmd' && return 0
+ '*:: :->subcmd' && return
-case "$state" in (subcmd)
- case "$words[1]" in
- (add)
- _arguments '-h' \
- '-P[Patch to add files to]:quilt series:_quilt_series' \
- '*:files:_files'
- ;;
- (annotate)
- _arguments '-h' \
- '-P[Stop checking for changes at the specified rather than the topmost patch]:quilt series:_quilt_series' \
- ':files:_files'
- ;;
- (applied)
- _arguments '-h' \
- ':quilt series:_quilt_series'
- ;;
- (delete)
- _arguments '-h' \
- '-n[Delete the next patch after topmost]' \
- '-r[Remove the deleted patch file from the patches directory as well]' \
- '--backup[Rename the patch file to patch~ rather than deleting it]' \
- ':quilt series:_quilt_series'
- ;;
- (diff)
- _arguments '-h' \
- '-p[Select a patch style]:quilt patch style:(0 1 ab)' \
- '-u[Create a unified diff]' \
- '-U[Create a unified diff with num lines of context]:quilt unified diff: ' \
- '-c[Create a context diff]' \
- '-C[Create a context diff with num lines of context]:quilt context diff: ' \
- '--no-timestamps[Do not include file timestamps in patch headers]' \
- '--no-index[Do not output Index: lines]' \
- '-z[Write to standard output the changes that have been made relative to the topmost or specified patch]' \
- '-R[Create a reverse diff]' \
- '-P[Create a diff for the specified patch]:quilt series:_quilt_series' \
- '--combine[Create a combined diff for all patches between this patch and the patch specified with -P]:quilt series:_quilt_series' \
- '--snapshot[Diff against snapshot]' \
- '--diff=[Use the specified utility for generating the diff]:quilt select diff utility:_command_names -e' \
- '--color=[Use syntax coloring]:quilt select color:(always auto never)' \
- '--sort[Sort files by their name]' \
- '*:files:_files'
- ;;
- (edit)
- _arguments '-h' \
- '*:files:_files'
- ;;
- (files)
- _arguments '-h' \
- '-a[List all files in all applied patches]' \
- '-l[Add patch name to output]' \
- '-v[Verbose, more user friendly output]' \
- '--combine[Create a listing for all patches between this patch and the topmost or specified patch]:quilt series:_quilt_series' \
- ':quilt series:_quilt_series'
- ;;
- (fold)
- _arguments '-h' \
- '-R[Apply patch in reverse]' \
- '-q[Quiet operation]' \
- '-f[Force apply]' \
- '-p[The number of pathname components to strip]:quilt select strip-level: '
- ;;
- (fork)
- _arguments '-h'
- ;;
- (graph)
- _arguments '-h' \
- '--all[Generate a graph including all applied patches and their dependencies]' \
- '--reduce[Eliminate transitive edges from the graph]' \
- '--lines[Compute dependencies by looking at the lines the patches modify]:quilt select lines: ' \
- '--edge-labels=files[Label graph edges with the file names that the adjacent patches modify]' \
- '-T ps[Directly produce a PostScript output file]' \
- ':quilt series:_quilt_series'
- ;;
- (grep)
- _arguments '-h'
- ;;
- (header)
- _arguments '-h' \
- '-a[Append the exiting patch header]' \
- '-r[Replace the exiting patch header]' \
- '-e[Edit the header in $EDITOR]' \
- '--strip-diffstat[Strip diffstat output from the header]' \
- '--strip-trailing-whitespace[Strip trailing whitespace at the end of lines of the header]' \
- '--backup[Create a backup copy of the old version of a patch as patch~]' \
- ':quilt series:_quilt_series'
- ;;
- (import)
- _arguments '-h' \
- '-p[Number of directory levels to strip when applying]:quilt select strip-level: ' \
- '-R[Apply patch in reverse]' \
- '-P[Patch filename to use inside quilt]:quilt select patch filename: ' \
- '-f[Overwrite/update existing patches]' \
- '-d[When overwriting in existing patch, keep the old (o), all (a), or new (n) patch header]:quilt select patch:(a n o)' \
- '*:files:_files'
- ;;
- (mail)
- _arguments '-h' \
- '-m[Text to use as the text in the introduction]:quilt select text: ' \
- '-M[Like the -m option, but read the introduction from file]:files:_files' \
- '--prefix[Use an alternate prefix in the bracketed part of the subjects generated]:quilt select prefix: ' \
- '--mbox[Store all messages in the specified file in mbox format]:files:_files' \
- '--send[Send the messages directly]' \
- '--sender[The envelope sender address to use]:quilt select sender: ' \
- '--from[From header]:quilt select from: ' \
- '--subject[Subject header]:quilt select subject: ' \
- '--to[Append a recipient to the To header]:quilt select to: ' \
- '--cc[Append a recipient to the Cc header]:quilt select cc: ' \
- '--bcc[Append a recipient to the Bcc header]:quilt select bcc: ' \
- '--signature[Append the specified signature to messages]:files:_files' \
- '--reply-to[Add the appropriate headers to reply to the specified message]:quilt select reply-to: ' \
- '*:quilt series:_quilt_series'
- ;;
- (new)
- _arguments '-h' \
- '-p[Select a patch style]:quilt patch style:(0 1 ab)'
- ;;
- (next)
- _arguments '-h' \
- ':quilt series:_quilt_series'
- ;;
- (patches)
- _arguments '-h' \
- '-v[Verbose, more user friendly output]' \
- ':files:_files'
- ;;
- (pop)
- _arguments '-h' \
- '-a[Remove all applied patches]' \
- '-f[Force remove]' \
- '-R[Always verify if the patch removes cleanly]' \
- '-q[Quiet operation]' \
- '-v[Verbose operation]' \
- ':quilt applied:_quilt_applied'
- ;;
- (previous)
- _arguments '-h' \
- ':quilt series:_quilt_series'
- ;;
- (push)
- _arguments '-h' \
- '-a[Apply all patches in the series file]' \
- '-q[Quiet operation]' \
- '-f[Force apply, even if the patch has rejects]' \
- '-v[Verbose operation]' \
- '--fuzz[Set the maximum fuzz factor]' \
- '--merge=[Merge the patch file into the original files]:quilt select merge:(merge diff3)' \
- '--leave-rejects[Leave around the reject files patch produced]' \
- '--color=[Use syntax coloring]:quilt select color:(always auto never)' \
- ':quilt unapplied:_quilt_unapplied'
- ;;
- (refresh)
- _arguments '-h' \
- '-p[Select a patch style]:quilt patch style:(0 1 ab)' \
- '-u[Create a unified diff]' \
- '-U[Create a unified diff with num lines of context]:quilt unified diff: ' \
- '-c[Create a context diff]' \
- '-C[Create a context diff with num lines of context]:quilt context diff: ' \
- '-z[Create a new patch containing the changes instead of refreshing the topmost patch]:quilt select new patch name: ' \
- '--no-timestamps[Do not include file timestamps in patch headers]' \
- '--no-index[Do not output Index: lines]' \
- '--diffstat[Add a diffstat section to the patch header, or replace the existing diffstat section]' \
- '-f[Enforce refreshing of a patch that is not on top]' \
- '--backup[Create a backup copy of the old version of a patch as patch~]' \
- '--sort[Sort files by their name instead of preserving the original order]' \
- '--strip-trailing-whitespace[Strip trailing whitespace at the end of lines]' \
- ':quilt series:_quilt_series'
- ;;
- (remove)
- _arguments '-h' \
- '-P[Patch to remove]:quilt series:_quilt_series'
- ;;
- (rename)
- _arguments '-h' \
- '-P[Patch to rename]:quilt series:_quilt_series'
- ;;
- (revert)
- _arguments '-h' \
- '-P[Revert changes in the named patch]:quilt series:_quilt_series' \
- '*:files:_files'
- ;;
- (series)
- _arguments '-h' \
- '-v[Verbose, more user friendly output]'
- ;;
- (setup)
- _arguments '-h' \
- '-d[Optional path prefix for the resulting source tree]:quilt select path-prefix: ' \
- '--sourcedir[Directory that contains the package sources]:quilt select package sources directory: ' \
- '-v[Verbose debug output]' \
- '--fuzz[Set the maximum fuzz factor]' \
- ':files:_files'
- ;;
- (snapshot)
- _arguments '-h' \
- '-d[Remove current snapshot]'
- ;;
- (top)
- _arguments '-h'
- ;;
- (unapplied)
- _arguments '-h' \
- ':quilt series:_quilt_series'
- ;;
- (upgrade)
- _arguments '-h'
- ;;
- (*)
- ;;
- esac
+[[ -z $state ]] && return 1
+rcfile=( ${opt_args[--quiltrc]:+--quiltrc=${opt_args[--quiltrc]}} )
+case $words[1] in
+ add)
+ _arguments -S $help \
+ '-P+[specify patch to add files to]:patch:_quilt_applied' \
+ '*:files:_files' && return
+ ;;
+ annotate)
+ _arguments $help \
+ '-P[stop checking for changes at the specified rather than the topmost patch]:patch:_quilt_series' \
+ ':files:_files' && return
+ ;;
+ applied) _arguments $help ':quilt series:_quilt_series' && return ;;
+ delete)
+ _arguments -s $help \
+ '(:)-n[delete the next patch after topmost]' \
+ '-r[remove the deleted patch file from the patches directory as well]' \
+ '--backup[rename the patch file to patch~ rather than deleting it]' \
+ '(-n):patch:_quilt_series' && return
+ ;;
+ diff)
+ _arguments -s $help $pstyle $pform $color \
+ "--no-timestamps[don't include file timestamps in patch headers]" \
+ "--no-index[don't output Index: lines]" \
+ '(-P --snapshot)-z[show changes relative to the topmost or specified patch]' \
+ '-R[create a reverse diff]' \
+ '(-z --snapshot)-P[create a diff for the specified patch]:patch:_quilt_series' \
+ '--combine[create a combined diff for all patches between this patch and the patch specified with -P]:patch:_quilt_series' \
+ '(-P -z)--snapshot[diff against snapshot]' \
+ '--diff=[use the specified utility for generating the diff]:diff utility:_command_names -e' \
+ '--sort[sort files by name]' \
+ '*:files:_files' && return
+ ;;
+ edit) _arguments $help '*:files:_files' && return ;;
+ files)
+ _arguments -s $help $verbose \
+ '-a[list all files in all applied patches]' \
+ '-l[add patch name to output]' \
+ '--combine[create a listing for all patches between this patch and the topmost or specified patch]::patch:_quilt_series' \
+ ':patch:_quilt_series' && return
+ ;;
+ fold)
+ _arguments -s $help \
+ '-R[apply patch in reverse]' \
+ '-q[quiet operation]' \
+ '-f[force apply]' \
+ '-p+[specify number of pathname components to strip]:components to strip' && return
+ ;;
+ fork) _arguments $help ':patch name' && return ;;
+ graph)
+ _arguments $help \
+ '--all[include all applied patches and their dependencies]' \
+ '--reduce[eliminate transitive edges from the graph]' \
+ '--lines=-[compute dependencies by looking at lines patches modify]::number of lines' \
+ '--edge-labels=files[label graph edges with file names that adjacent patches modify]' \
+ '-T ps[produce a PostScript output file]' \
+ ':patch:_quilt_series' && return
+ ;;
+ grep) _grep && return ;;
+ header)
+ _arguments $help \
+ '(-r -e -h)-a[append to existing patch header]' \
+ '(-a -e -h)-r[replace existing patch header]' \
+ '(-a -r -h)-e[edit the header in $EDITOR]' \
+ '--strip-diffstat[strip diffstat output from the header]' \
+ '--strip-trailing-whitespace[strip trailing whitespace at the end of lines of the header]' \
+ '--backup[create backup copy of patch with tilde suffix]' \
+ ':patch:_quilt_series' && return
+ ;;
+ import)
+ _arguments $help \
+ '-p+[number of directory levels to strip when applying]:quilt select strip-level: ' \
+ '-R[apply patch in reverse]' \
+ '-P+[patch filename to use inside quilt]:quilt select patch filename: ' \
+ '-f[overwrite/update existing patches]' \
+ '-d+[header resolution when overwriting in existing patch]:resolution:((a\:all\ headers n\:new\ headers o\:old\ headers))' \
+ '*:files:_files' && return
+ ;;
+ mail)
+ _arguments $help \
+ '(-h -M)-m[introduction text to use]:introduction text' \
+ '(-h -m)-M[read introduction text from file]:file:_files' \
+ '--prefix=[use an alternate prefix in the bracketed part of the subjects generated]:quilt select prefix: ' \
+ '--mbox=[store all messages in the specified file in mbox format]:files:_files' \
+ '--send[send the messages directly]' \
+ '--sender=[specify envelope sender address to use]:sender:_email_addresses -c' \
+ '--from=[from header]:address:_email_addresses' \
+ '--subject=[subject header]:subject' \
+ '*--to=[append a recipient to the To header]:recipient:_email_addresses' \
+ '*--cc=[append a recipient to the Cc header]:recipient:_email_addresses' \
+ '*--bcc=[append a recipient to the Bcc header]:recipient:_email_addresses' \
+ '--signature=[append specified signature file to messages]:files:_files' \
+ '--reply-to=[add reply address to message]:address:_email_addresses' \
+ '*:patch:_quilt_series' && return
+ ;;
+ new) _arguments $help $pstyle ':patch name' && return ;;
+ next) _arguments $help ':patch:_quilt_series' && return ;;
+ patches) _arguments -S $help $verbose $color '*:files:_files' && return ;;
+ pop)
+ _arguments -s $help $verbose \
+ '-a[remove all applied patches]' \
+ '-f[force remove]' \
+ '-R[always verify if the patch removes cleanly]' \
+ '-q[quiet operation]' \
+ ':patch:_quilt_applied' && return
+ ;;
+ previous) _arguments $help ':patch:_quilt_series' && return ;;
+ push)
+ _arguments $help $verbose $color \
+ '-a[apply all patches in the series file]' \
+ '-q[quiet operation]' \
+ '-f[force apply, even if the patch has rejects]' \
+ '--fuzz=[set the maximum fuzz factor]:factor [2]' \
+ '--merge=[merge the patch file into the original files]::merge scheme:(merge diff3)' \
+ '--leave-rejects[leave around the reject files patch produced]' \
+ ':quilt unapplied:_quilt_unapplied' && return
+ ;;
+ refresh)
+ _arguments -s $help $pstyle $pform \
+ '-z-[create a new patch containing the changes instead of refreshing the topmost patch]::new patch name' \
+ '--no-timestamps[do not include file timestamps in patch headers]' \
+ '--no-index[do not output Index: lines]' \
+ '--diffstat[add a diffstat section to the patch header, or replace the existing diffstat section]' \
+ '-f[enforce refreshing of a patch that is not on top]' \
+ '--backup[create a backup copy of the old version of a patch as patch~]' \
+ '--sort[sort files by their name instead of preserving the original order]' \
+ '--strip-trailing-whitespace[strip trailing whitespace at the end of lines]' \
+ ':patch:_quilt_series' && return
+ ;;
+ remove)
+ _arguments $help \
+ '-P[patch to remove]:patch:_quilt_series' \
+ '*:file:_files' && return
+ ;;
+ rename)
+ _arguments $help \
+ '(-h)-P[patch to rename]:patch:_quilt_series' \
+ ':new name' && return
+ ;;
+ revert)
+ _arguments $help \
+ '-P[revert changes in the named patch]:patch:_quilt_series' \
+ '*:files:_files' && return
+ ;;
+ series) _arguments $help $verbose $color && return ;;
+ setup)
+ _arguments $help $verbose \
+ '-d[specify path prefix for resulting source tree]:prefix:_files -W / -P /' \
+ '--sourcedir[specify location of package sources]:directory:_directories' \
+ '--fuzz=[set the maximum fuzz factor]:factor' \
+ ':files:_files' && return
+ ;;
+ snapshot) _arguments $help '-d[only remove current snapshot]' && return ;;
+ unapplied) _arguments $help ':patch:_quilt_series' && return ;;
+ top|upgrade) _arguments $help && return ;;
+ *)
+ _default
+ return
;;
esac
+
+return 1
diff --git a/Completion/Unix/Command/_stgit b/Completion/Unix/Command/_stgit
index b2f2aeafa..6248267eb 100644
--- a/Completion/Unix/Command/_stgit
+++ b/Completion/Unix/Command/_stgit
@@ -32,6 +32,17 @@ else
compadd $(stg series --noprefix 2> /dev/null) \
&& ret=0
;;
+ (ref*)
+ last_word="$words[$CURRENT-1]"
+ refresh_patch_options=( -p --patch )
+ if [[ -n ${refresh_patch_options[(r)$last_word]} ]]; then
+ _wanted -V "applied patches" expl "patch" \
+ compadd ${${(M)${(f)"$(stg series 2> /dev/null)"}##[+>] *}#[+>] } \
+ && ret=0
+ else
+ _files
+ fi
+ ;;
(*)
_files
;;
diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl
index 36b579bc7..ff3312fac 100644
--- a/Completion/Unix/Command/_sysctl
+++ b/Completion/Unix/Command/_sysctl
@@ -1,9 +1,9 @@
#compdef sysctl
case $OSTYPE in
- *freebsd[5-9].*|freebsd4.[4-9]*)
+ *freebsd<5->.*|freebsd4.[4-9]*)
local -a sysctlvars
- sysctlvars=( $(sysctl -aN) )
+ sysctlvars=( $(_call_program sysctl-variables sysctl -aN) )
_arguments -s -A "-*" \
'(*)-a[list all]' \
'-b[binary output]' \
@@ -41,5 +41,8 @@ case $OSTYPE in
'(-w)-n[show only values]' \
'(-a -A -n)-w[write variable]' \
'(-a -A)*:sysctl variable:_multi_parts ${words[(r)-w]:+-S=} -i . _cache_sysctlvars'
- ;;
+ ;;
+ *)
+ _default
+ ;;
esac
diff --git a/Completion/Unix/Type/_mime_types b/Completion/Unix/Type/_mime_types
index b8ed889b8..18a332e09 100755
--- a/Completion/Unix/Type/_mime_types
+++ b/Completion/Unix/Type/_mime_types
@@ -33,10 +33,10 @@ if [[ $PREFIX = (#b)([^/]##)/* ]]; then
compset -p $(( ${#maintype} + 1 ))
_wanted mime-subtypes expl 'MIME subtype' \
compadd -- $(sed -ne "s%^\(type=\|\)${maintype}/\([^ ]*\).*$%\2%p" \
- $type_files)
+ $type_files 2>/dev/null)
else
# Search for main type.
_wanted mime-types expl 'MIME type' \
compadd -S/ -- $(sed -ne "s/^type=//" \
- -e "s%^\(${PREFIX:-[a-z]}[^=\"]*\)/.*$%\1%p" $type_files)
+ -e "s%^\(${PREFIX:-[a-z]}[^=\"]*\)/.*$%\1%p" $type_files 2>/dev/null)
fi
diff --git a/Completion/Unix/Type/_net_interfaces b/Completion/Unix/Type/_net_interfaces
index 666287259..2cac3e3bb 100644
--- a/Completion/Unix/Type/_net_interfaces
+++ b/Completion/Unix/Type/_net_interfaces
@@ -3,6 +3,10 @@
local expl list intf sep
local -a disp
+# Make sure needed tools are in the path.
+local PATH=$PATH
+PATH=/sbin:$PATH
+
case $OSTYPE in
aix*)
intf=( ${(f)"$(lsdev -C -c if -F 'name:description')"} )
@@ -14,17 +18,22 @@ case $OSTYPE in
;;
darwin*|freebsd*|dragonfly*) intf=( $(ifconfig -l) ) ;;
irix*) intf=( ${${${(f)"$(/usr/etc/netstat -i)"}%% *}[2,-1]} ) ;;
+ *linux*)
+ if (( $+commands[ip] )); then
+ intf=( ${${(m)${(f)"$(ip -o link)"}#*: }%%: *} )
+ fi
+ ;&
*)
- # Make sure ifconfig is in the path.
- local PATH=$PATH
- PATH=/sbin:$PATH
- intf=( $(ifconfig -a 2>/dev/null | sed -n 's/^\([^ :]*\).*/\1/p') )
- if [[ ${#intf} -eq 0 && -d /proc/sys/net/ipv4/conf ]]; then
- # On linux we used to use the following as the default.
- # However, we now use ifconfig since it finds additional devices such
- # as tunnels. So only do this if that didn't work.
- intf=( /proc/sys/net/ipv4/conf/*~*(all|default)(N:t) )
+ if [[ ${#intf} -eq 0 ]]; then
+ # linux's deprecated ifconfig may truncate long interface names
+ intf=( $(ifconfig -a 2>/dev/null | sed -n 's/^\([^ :]*\).*/\1/p') )
+ if [[ -d /proc/sys/net/ipv4/conf ]]; then
+ # On linux we used to use the following as the default.
+ # However, we now use ip or ifconfig since it finds additional devices such
+ # as tunnels. So only do this if that didn't work.
+ intf=( /proc/sys/net/ipv4/conf/*~*(all|default)(N:t) )
+ fi
fi
;;
esac
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 85feae54c..ed3f54de3 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -15,13 +15,21 @@ local -a match mbegin mend
# a bare glob qualifier.
# The later test looks for an outstanding quote.
if _have_glob_qual $PREFIX; then
- compset -p ${#match[1]}
- if [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\#'; then
- _globflags
- else
- _globquals
- fi
- return
+ local ret=1
+ compset -p ${#match[1]}
+ if [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\#'; then
+ _globflags && ret=0
+ else
+ if [[ $_comp_caller_options[extendedglob] == on ]]; then
+ local -a flags
+ flags=(
+ '#:introduce glob flag'
+ )
+ _describe -t globflags "glob flag" flags -Q -S '' && ret=0
+ fi
+ _globquals && ret=0
+ fi
+ return ret
fi
# Utility function for in-path completion. This allows `/u/l/b<TAB>'
diff --git a/Completion/X/Command/_mplayer b/Completion/X/Command/_mplayer
index eaf6e84bc..f2f4c3d45 100644
--- a/Completion/X/Command/_mplayer
+++ b/Completion/X/Command/_mplayer
@@ -115,7 +115,7 @@ case "$state" in
_tags files urls
while _tags; do
_requested files expl 'media file' _files -g \
- "*.(#i)(asf|asx|avi|flac|flv|m1v|m2p|m2v|m4v|mjpg|mka|mkv|mov|mp3|mp4|mpe|mpeg|mpg|ogg|ogm|ogv|qt|rm|ts|vob|wav|webm|wma|wmv)(-.)" && ret=0
+ "*.(#i)(asf|asx|avi|flac|flv|m1v|m2p|m2v|m4a|m4v|mjpg|mka|mkv|mov|mp3|mp4|mpe|mpeg|mpg|ogg|ogm|ogv|qt|rm|ts|vob|wav|webm|wma|wmv)(-.)" && ret=0
if _requested urls; then
while _next_label urls expl URL; do
_urls "$expl[@]" && ret=0
diff --git a/Completion/Zsh/Command/_setopt b/Completion/Zsh/Command/_setopt
index f72c20dda..fb38d1da6 100644
--- a/Completion/Zsh/Command/_setopt
+++ b/Completion/Zsh/Command/_setopt
@@ -1,10 +1,16 @@
-#compdef setopt
+#compdef setopt unsetopt
-# If you first want to complete only unset options, un-comment the lines
-# setting the _options_unset array and then use:
-#
-# _options_unset || _options
-#
-# here.
+local expl ret=1
+local -a onopts offopts
+onopts=( ${(k)_comp_caller_options[(R)on]} )
+offopts=( ${(k)_comp_caller_options[(R)off]} )
+case $service in
+ setopt) onopts=(no$onopts) ;;
+ unsetopt) offopts=(no$offopts) ;;
+esac
+_wanted zsh-options expl 'zsh options (set)' \
+ compadd -J 'enabled options' -M 'M:_= M:{A-Z}={a-z}' -k - onopts && ret=0
+_wanted zsh-options expl 'zsh options (unset)' \
+ compadd -J 'disabled options' -M 'M:_= M:{A-Z}={a-z}' -k - offopts && ret=0
-_options
+return ret
diff --git a/Completion/Zsh/Command/_typeset b/Completion/Zsh/Command/_typeset
index f876e1beb..367dbfc23 100644
--- a/Completion/Zsh/Command/_typeset
+++ b/Completion/Zsh/Command/_typeset
@@ -1,7 +1,7 @@
#compdef autoload declare export functions integer float local readonly typeset
local expl state line func i use curcontext="$curcontext"
-local fopts="-f -k -z"
+local fopts="-f -k -z +k +z"
local popts="-A -E -F -L -R -T -Z -a -g -h -H -i -l -r -x"
local -A allargs opt_args
local -a args
@@ -51,8 +51,9 @@ case ${service} in
;;
float) use="EFHghlprtux";;
functions)
- use="UkmTtuz"
+ use="UkmTtuzM"
func=f
+ allargs[M]='(-k -t -T -u -U -z -M +M +k +t +z)-+M[define mathematical function]'
;;
integer)
use="Hghilprtux"
@@ -73,14 +74,20 @@ onopts=${(j..)${${words[1,CURRENT-1]:#^-*}##-}}
offopts=${(j..)${${words[1,CURRENT-1]:#^+*}##+}}
for ((i=1;i<=$#use;++i)); do
- args+=( ${allargs[${use[$i]}${${(s::)use[$i]}[(r)[Uut]]:+$func}]} )
+ args+=( ${allargs[${use[$i]}${${(s::)use[$i]}[(r)[UutT]]:+$func}]} )
done
_arguments -C -s -A "-*" -S "${args[@]}" '*::vars:= ->vars_eq'
if [[ "$state" = vars_eq ]]; then
if [[ $func = f ]]; then
- if (( $+opt_args[-w] ));then
+ if (( $+opt_args[+M] || ( $+opt_args[-M] && $+opt_args[-m] ) )); then
+ _wanted functions expl 'math function' compadd -F line - \
+ ${${${(f)"$(functions -M)"}##*-M }%% *}
+ elif (( $+opt_args[-M] )); then
+ _arguments ':new math function:_functions' ':minimum arguments' \
+ ':maximum arguments' ':shell function:_functions'
+ elif (( $+opt_args[-w] )); then
_wanted files expl 'zwc file' _files -g '*.zwc(-.)'
elif [[ $service = autoload || -n $opt_args[(i)-[uU]] ]]; then
args=(${^fpath}/*(-.:t))
diff --git a/Completion/Zsh/Command/_unsetopt b/Completion/Zsh/Command/_unsetopt
deleted file mode 100644
index 75a33e9dd..000000000
--- a/Completion/Zsh/Command/_unsetopt
+++ /dev/null
@@ -1,10 +0,0 @@
-#compdef unsetopt
-
-# If you first want to complete only unset options, uncomment the lines
-# setting the _options_set array and then use:
-#
-# _options_set || _options
-#
-# here.
-
-_options