summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_chown4
-rw-r--r--Completion/Unix/Command/_diffstat20
-rw-r--r--Completion/Unix/Command/_git59
-rw-r--r--Completion/Unix/Command/_pgrep8
-rw-r--r--Completion/Unix/Command/_sed1
-rw-r--r--Completion/Unix/Command/_sqlite2
-rw-r--r--Completion/Unix/Command/_ssh3
7 files changed, 71 insertions, 26 deletions
diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown
index c3abb5858..2c63a399a 100644
--- a/Completion/Unix/Command/_chown
+++ b/Completion/Unix/Command/_chown
@@ -23,7 +23,6 @@ if _pick_variant gnu=Free\ Soft unix --version; then
args+=( '--from=[restrict changes to files by current ownership]: :->owner' )
else
args=(
- "-f[don't report errors]"
"-h[operate on symlinks them self]"
'-R[change files and directories recursively]'
'(-H -L -P)-L[follow all symlinks]'
@@ -31,7 +30,8 @@ else
'(-H -L -P)-P[do not follow symlinks (default)]'
)
for pattern arg in \
- 'freebsd*' "-x[don't traverse file systems]" \
+ '(dragonfly|freebsd)*' "-x[don't traverse file systems]" \
+ '(darwin|dragonfly|(free|net)bsd|solaris)*' "-f[don't report errors]" \
'(darwin|dragonfly|(free|net)bsd)*' '-v[output info for every file processed]' \
'solaris2.<11->' '-s[owner and/or group are Windows SID strings]'
do
diff --git a/Completion/Unix/Command/_diffstat b/Completion/Unix/Command/_diffstat
index c9f8e3049..9e7bf779b 100644
--- a/Completion/Unix/Command/_diffstat
+++ b/Completion/Unix/Command/_diffstat
@@ -5,28 +5,28 @@ _arguments -s -S \
'-c[prefix each line with hash mark]' \
'-C[use color highlighting of histogram]' \
'-d[print debug information]' \
- '-D[specify location of patched files for unchanged count]:location:_directories' \
- '-e[redirect standard error to specified file]:error file:_files' \
+ '-D+[specify location of patched files for unchanged count]:location:_directories' \
+ '-e+[redirect standard error to specified file]:error file:_files' \
'-E[trim escape sequences, e.g. from colordiff]' \
- '-f[specify histogram format]:format:((0\:concise 1\:normal 2\:dots 3\:dots+normal 4\:value 5\:value+normal 6\:value+dots 7\:value+dots+normal))' \
+ '-f+[specify histogram format]:format:((0\:concise 1\:normal 2\:dots 3\:dots+normal 4\:value 5\:value+normal 6\:value+dots 7\:value+dots+normal))' \
'(- *)-h[display help information]' \
'-k[suppress merging of filenames in report]' \
'-K[resolve ambiguity of "only" filenames]' \
'-l[list only the filenames]' \
'-m[merge insert/delete data in chunks as modified-lines]' \
- '-n[specify minimum width for filenames]:width [auto]' \
- '-N[specify maximum width for filenames]:width [auto]' \
- '-o[redirect standard output to specified file]:output file:_files' \
- '-p[specify number of path separators to strip]:path components [common]' \
+ '-n+[specify minimum width for filenames]:width [auto]' \
+ '-N+[specify maximum width for filenames]:width [auto]' \
+ '-o+[redirect standard output to specified file]:output file:_files' \
+ '-p+[specify number of path separators to strip]:path components [common]' \
'-q[suppress "0 files changed" message for empty diffs]' \
- '-r[specify rounding for histogram]:rounding:((0\:none 1\:simple 2\:simple+adjustment))' \
+ '-r+[specify rounding for histogram]:rounding:((0\:none 1\:simple 2\:simple+adjustment))' \
'(-t)-s[show only the summary line]' \
- '-S[specify location of original files for unchanged count]:location:_directories' \
+ '-S+[specify location of original files for unchanged count]:location:_directories' \
'-R[assume patch was created with old and new files swapped]' \
'(-T -s)-t[overrides histogram, generates csv output]' \
'(-t)-T[print amounts (like -t) in addition to histogram]' \
'-u[suppress sorting of filenames in report]' \
'-v[show progress]' \
'(- *)-V[print version number]' \
- '-w[specify maximumn width of output]:maximum width [80]' \
+ '-w+[specify maximumn width of output]:maximum width [80]' \
'*:patch file:_files'
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 0eb16987d..f6cec8b60 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -116,6 +116,8 @@ _git-am () {
'(-u --utf8 --no-utf8)--no-utf8[pass -n to git mailinfo]' \
'(-3 --3way)'{-3,--3way}'[use 3-way merge if patch does not apply cleanly]' \
$apply_options \
+ '--quit[abort the patching operation but keep HEAD where it is]' \
+ '--show-current-patch[show the patch being applied]' \
'(-i --interactive)'{-i,--interactive}'[apply patches interactively]' \
'--committer-date-is-author-date[use author date as committer date]' \
'--ignore-date[use committer date as author date]' \
@@ -637,6 +639,7 @@ _git-clone () {
'--separate-git-dir[place .git dir outside worktree]:path to .git dir:_path_files -/' \
'(-4 --ipv4 -6 --ipv6)'{-4,--ipv4}'[use IPv4 addresses only]' \
'(-4 --ipv4 -6 --ipv6)'{-6,--ipv6}'[use IPv6 addresses only]' \
+ '--filter=[object filtering]:filter:_git_rev-list_filters' \
': :->repository' \
': :_directories' && ret=0
@@ -685,6 +688,8 @@ _git-commit () {
$reset_author_opt \
'( --porcelain --dry-run)--short[dry run with short output format]' \
'--branch[show branch information]' \
+ '!(--no-ahead-behind)--ahead-behind' \
+ "--no-ahead-behind[don't display detailed ahead/behind counts relative to upstream branch]" \
'(--short --dry-run)--porcelain[dry run with machine-readable output format]' \
'(--short --porcelain --dry-run -z --null)'{-z,--null}'[dry run with NULL-separated output format]' \
{-p,--patch}'[use the interactive patch selection interface to chose which changes to commit]' \
@@ -865,6 +870,8 @@ _git-fetch () {
'--deepen[deepen history of shallow clone]:number of commits' \
'(-n --no-tags -t --tags)'{-n,--no-tags}'[disable automatic tag following]' \
'(--all -m --multiple)'{-m,--multiple}'[fetch from multiple remotes]' \
+ '(-P --prune-tags)'{-P,--prune-tags}'[prune local tags no longer on remote and clobber changed tags]' \
+ '--filter=[object filtering]:filter:_git_rev-list_filters' \
'*:: :->repository-or-group-or-refspec' && ret=0
case $state in
@@ -1431,6 +1438,7 @@ _git-rebase () {
'(-)--edit-todo[edit interactive instruction sheet in an editor]' \
'(-)--skip[skip the current patch]' \
'(-)--quit[abort but keep HEAD where it is]' \
+ '(-)--show-current-patch[show the patch file being applied or merged]' \
- options \
'(-m --merge)'{-m,--merge}'[use merging strategies to rebase]' \
'(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=-}'[GPG-sign the commit]::key id' \
@@ -1450,6 +1458,7 @@ _git-rebase () {
'(-p --preserve-merges --interactive)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \
{-x+,--exec=}'[with -i\: append "exec <cmd>" after each line]:command:_command_names -e' \
'(-k --keep-empty)'{-k,--keep-empty}'[keep empty commits in the result]' \
+ '--allow-empty-message[allow rebasing commits with empty messages]' \
'(1)--root[rebase all reachable commits]' \
$autosquash_opts \
'(--autostash --no-autostash)--autostash[stash uncommitted changes before rebasing and apply them afterwards]' \
@@ -1747,6 +1756,8 @@ _git-status () {
$branch_opts \
'(-s --short)--porcelain=-[produce machine-readable output]:version:(v1)' \
'(-s --short)--show-stash[show stash information]' \
+ '!(--no-ahead-behind)--ahead-behind' \
+ "--no-ahead-behind[don't display detailed ahead/behind counts relative to upstream branch]" \
'(-u --untracked-files)'{-u-,--untracked-files=-}'[show untracked files]::mode:((no\:"show no untracked files" \
normal\:"show untracked files and directories" \
all\:"also show untracked files in untracked directories (default)"))' \
@@ -1988,6 +1999,7 @@ _git-tag () {
_arguments \
- creation \
'(-a --annotate -s --sign -u --local-user)'{-a,--annotate}'[create an unsigned, annotated tag]' \
+ '(-e --edit)'{-e,--edit}'[force edit of tag message]' \
'(-a --annotate -s --sign -u --local-user)'{-s,--sign}'[create a signed and annotated tag]' \
'(-a --annotate -s --sign)'{-u+,--local-user=}'[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \
'(-f --force)'{-f,--force}'[replace existing tag]' \
@@ -2037,6 +2049,8 @@ _git-worktree() {
prune:'prune working tree information'
list:'list details of each worktree'
lock:'prevent a working tree from being pruned'
+ move:'move a working tree to a new location'
+ remove:'remove a working tree'
unlock:'allow working tree to be pruned, moved or deleted'
)
@@ -2051,32 +2065,44 @@ _git-worktree() {
else
args=( ':commit:__git_commits' )
fi
- _arguments \
+ _arguments -S \
'(-f --force)'{-f,--force}'[checkout branch even if already checked out in another worktree]' \
'(-B --detach)-b+[create a new branch]: :__git_branch_names' \
'(-b --detach)-B+[create or reset a branch]: :__git_branch_names' \
'(-b -B)--detach[detach HEAD at named commit]' \
'--no-checkout[suppress file checkout in new worktree]' \
- ':path:_files' $args && ret=0
+ '--lock[keep working tree locked after creation]' \
+ ':path:_directories' $args && ret=0
;;
(prune)
- _arguments \
+ _arguments -S \
'(-n --dry-run)'{-n,--dry-run}"[don't remove, show only]" \
'(-v --verbose)'{-v,--verbose}'[report pruned objects]' \
'--expire[expire objects older than specified time]:time' && ret=0
;;
(list)
- _arguments '--porcelain[machine-readable output]' && ret=0
+ _arguments -S '--porcelain[machine-readable output]' && ret=0
;;
(lock)
- _arguments -C '--reason=[specify reason for locking]:reason' ': :->worktrees' && ret=0
- [[ -z $state ]] && return ret
- ;&
+ _arguments -C -S '--reason=[specify reason for locking]:reason' ': :->worktrees' && ret=0
+ ;;
+ (move)
+ _arguments -C \
+ ': :->worktrees' \
+ ':location:_directories' && ret=0
+ ;;
+ (remove)
+ _arguments -C -S '--force[remove working trees that are not clean or that have submodules]' \
+ ': :->worktrees' && ret=0
+ ;;
(unlock)
- _wanted directories expl 'working tree' compadd -S ' ' -f -M 'r:|/=* r:|=*' \
- ${${(M)${(f)"$(_call_program directories git worktree list --porcelain)"}:#worktree*}#* }
+ state=worktrees
;;
esac
+ if [[ $state = worktrees ]]; then
+ _wanted directories expl 'working tree' compadd -S ' ' -f -M 'r:|/=* r:|=*' \
+ ${${(M)${(f)"$(_call_program directories git worktree list --porcelain)"}:#worktree*}#* } && ret=0
+ fi
;;
esac
return ret
@@ -3442,6 +3468,7 @@ _git-prune () {
'(-v --verbose)'{-v,--verbose}'[report all removed objects]' \
'--progress[show progress]' \
'--expire=[only expire loose objects older than specified date]: :__git_datetimes' \
+ '--exclude-promisor-objects[limit traversal to objects outside promisor packfiles]' \
'*:: :__git_heads'
}
@@ -4133,11 +4160,14 @@ _git-send-email () {
'--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' \
+ '--reply-to=[specify Reply-To address]:email address:_email_addresses' \
'--in-reply-to=[specify contents of first In-Reply-To header]:message-id' \
'--subject=[specify the initial subject of the email thread]:subject' \
'--to=[specify the primary recipient of the emails]: :_email_addresses' \
+ "--no-xmailer[don't add X-Mailer header]" \
'--8bit-encoding=[encoding to use for non-ASCII messages]: :__git_encodings' \
'--compose-encoding=[encoding to use for compose messages]: :__git_encodings' \
+ '--transfer-encoding=[specify transfer encoding to use]:transfer encoding:(quoted-printable 8bit base64)' \
'--envelope-sender[specify the envelope sender used to send the emails]: :_email_addresses' \
'--smtp-encryption=[specify encryption method to use]: :__git_sendemail_smtpencryption_values' \
'--smtp-domain=[specify FQDN used in HELO/EHLO]: :_domains' \
@@ -4147,7 +4177,10 @@ _git-send-email () {
'--smtp-server-option=[specify the outgoing SMTP server option to use]:SMPT server option' \
'--smtp-ssl-cert-path=[path to ca-certificates (directory or file)]:ca certificates path:_files' \
'--smtp-user=[specify user to use for SMTP-AUTH]:smtp user:_users' \
+ '--smtp-auth=[specify allowed AUTH mechanisms]:space-separated list of mechanisms' \
'--smtp-debug=[enable or disable debug output]:smtp debug:((0\:"disable" 1\:"enable"))' \
+ '--batch-size=[specify maximum number of messages per connection]:number' \
+ '--relogin-delay=[specify delay between successive logins]:delay (seconds)' \
'--cc-cmd=[specify command to generate Cc\: header with]:Cc\: command:_cmdstring' \
'--to-cmd=[specify command to generate To\: header with]:To\: command:_cmdstring' \
'( --no-chain-reply-to)--chain-reply-to[send each email as a reply to previous one]' \
@@ -4168,6 +4201,7 @@ _git-send-email () {
'( --no-validate)--validate[perform sanity checks on patches]' \
'(--validate )--no-validate[do not perform sanity checks on patches]' \
'--force[send emails even if safety checks would prevent it]' \
+ '(- *)--dump-aliases[dump configured aliases and exit]' \
'*: : _alternative -O expl
"files:file:_files"
"commits:recent commit object name:__git_commit_objects_prefer_recent"'
@@ -4671,7 +4705,8 @@ _git-pack-objects () {
'--use-bitmap-index[use a bitmap index if available to speed up counting objects]' \
'--write-bitmap-index[write a bitmap index together with the pack index]' \
'--filter=[omit certain objects from pack file]:filter:_git_rev-list_filters' \
- '--missing=[specify how missing objects are handled]:action:(error allow-any print)' \
+ '--missing=[specify how missing objects are handled]:action:(error allow-any allow-promisor print)' \
+ "--exclude-promisor-objects[don't pack objects in promisor packfiles]" \
':base-name:_files'
}
@@ -5080,7 +5115,7 @@ _git-rev-list () {
'--no-filter[turn off any previous --filter argument]' \
'--filter-print-omitted[print a list of objects omitted by --filter]' \
'--filter=[omit certain objects from pack file]:filter:_git_rev-list_filters' \
- '--missing=[specify how missing objects are handled]:action:(error allow-any print)' \
+ '--missing=[specify how missing objects are handled]:action:(error allow-any allow-promisor print)' \
'(--count --pretty --header --left-right --abbrev-commit --abbrev --parent --children)--quiet[print nothing; exit status indicates if objects are fully connected]' \
'--use-bitmap-index[try to speed traversal using pack bitmap index if available]' \
'--progress=-[show progress reports as objects are considered]:header' \
@@ -5197,6 +5232,7 @@ _git-daemon () {
'--forbid-override[forbid overriding site-wide service]: :__git_daemon_service' \
'(--no-informative-errors)--informative-errors[report more verbose errors to the client]' \
'(--informative-errors)--no-informative-errors[report all errors as "access denied" to the client]' \
+ '--log-destination=[send log messages to the specified destination]:destination:(stderr syslog none)' \
'*:repository:_directories'
}
@@ -7071,6 +7107,7 @@ __git_setup_diff_options () {
'--diff-filter=-[select certain kinds of files for diff]: :_guard "[AaCcDdMmRrTtUuXxBb*]#" kinds'
'-S-[look for differences that add or remove the given string]:string'
'-G-[look for differences whose added or removed line matches the given regex]:pattern'
+ '--find-object=[look for differences that change the number of occurrences of the specified object]:object:__git_blobs'
'--pickaxe-all[when -S finds a change, show all changes in that changeset]'
'--pickaxe-regex[treat argument of -S as regular expression]'
'-O-[output patch in the order of glob-pattern lines in given file]: :_files'
diff --git a/Completion/Unix/Command/_pgrep b/Completion/Unix/Command/_pgrep
index 714bf095b..ec3f8bfd0 100644
--- a/Completion/Unix/Command/_pgrep
+++ b/Completion/Unix/Command/_pgrep
@@ -32,9 +32,7 @@ arguments=('-P[parent process id]:parent process id:->ppid'
'-x[match exactly]'
'-z[match only in zones]:zone:_zones')
-if [[ $service == 'pkill' ]]; then
- arguments+=('-'${^signals}'[signal]')
-elif [[ $service == 'pgrep' ]]; then
+if [[ $service == 'pgrep' ]]; then
arguments+=('-d[output delimiter]:delimiter:compadd ${(s\:\:)IFS}'
'-l[list name in addition to id]')
fi
@@ -64,8 +62,12 @@ case "$OSTYPE" in
optchars="flvxdnoPgsuUGt"
;;
esac
+# Only keep relevant arguments according to $optchars.
arguments=( ${(M)arguments:#(|\*)(|\(*\))-[$optchars]*}
'*:process name:->pname')
+if [[ $service == 'pkill' ]]; then
+ arguments+=('-'${^signals}'[signal]')
+fi
_arguments -C -s -w $arguments && ret=0
diff --git a/Completion/Unix/Command/_sed b/Completion/Unix/Command/_sed
index 222798b8a..15b92a634 100644
--- a/Completion/Unix/Command/_sed
+++ b/Completion/Unix/Command/_sed
@@ -21,6 +21,7 @@ elif _pick_variant gnu=GNU unix --version; then
args+=(
'--follow-symlinks[follow symlinks when processing in place]'
'(-i --in-place)'{-i-,--in-place=-}$inplace
+ '(-c --copy)'{-c,--copy}'[copy instead of rename when shuffling files in in-place mode]'
'(-l --line-length)'{-l,--line-length=-}'[specify line-wrap length for the l command]'
'(-r)--posix[disable GNU extensions]'
'(-E -r --regexp-extended)'{-E,-r,--regexp-extended}$extended
diff --git a/Completion/Unix/Command/_sqlite b/Completion/Unix/Command/_sqlite
index f63f4c085..58f7a9116 100644
--- a/Completion/Unix/Command/_sqlite
+++ b/Completion/Unix/Command/_sqlite
@@ -41,6 +41,7 @@ options+=(
)
(( $+sqlite3 )) && options+=(
+ $^dashes'-append[append the database to the end of the file]'
$^dashes'-bail[stop after hitting an error]'
$^dashes'-cmd[run specified command before reading stdin]:sqlite meta-command'
'(-*batch -*interactive)'$^dashes'-batch[force batch I/O]'
@@ -49,6 +50,7 @@ options+=(
$^dashes'-mmap[set default mmap size]:size'
$^dashes'-newline[set output row separator]:separator [\n]'
$^dashes'-pagecache[specify size and number of slots for page cache memory]:size (bytes): :slots'
+ $^dashes'-readonly[open the database read-only]'
$^dashes'-stats[print memory stats before each finalize]'
$^dashes'-vfs[use specified default VFS]:vfs:(unix-dotfile unix-excl unix-none unix-namedsem)'
)
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 2aae7027e..9c827d655 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -32,6 +32,7 @@ _ssh () {
_arguments -C -s \
'(-a)-A[enable forwarding of the authentication agent connection]' \
'(-A)-a[disable forwarding of authentication agent connection]' \
+ '-B+[bind to specified interface before attempting to connect]:interface:_net_interfaces' \
'(-P)-b+[specify interface to transmit on]:bind address:_bind_addresses' \
'-D+[specify a dynamic port forwarding]:dynamic port forwarding:->dynforward' \
'-e+[set escape character]:escape character (or `none'\''):' \
@@ -90,6 +91,8 @@ _ssh () {
'-k[load plain private keys only and skip certificates]' \
'-L[list public key parameters of all identities in the agent]'\
'-l[list all identities]' \
+ '-m+[specify minimum remaining signatures before maximum is changed]:number' \
+ '-M+[specify maximum number of signatures]:number' \
'-s+[add keys provided by the PKCS#11 shared library]:library:_files -g "*.(so|dylib)(|.<->)(-.)"' \
'-t+[set maximum lifetime for identity]:maximum lifetime (in seconds or time format):' \
'-q[be quiet after a successful operation]' \