summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-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
10 files changed, 338 insertions, 259 deletions
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