From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH 2/2] _quilt: Add subcommand descriptions
Date: Thu, 26 Mar 2020 00:53:31 +0000 [thread overview]
Message-ID: <20200326005331.17708-2-danielsh@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20200326005331.17708-1-danielsh@tarpaulin.shahaf.local2>
---
The descriptions are adapted from the quilt(1) man page. I don't think
that raises any copyright concerns; just mentioning this out of an
abundance of caution.
Cheers,
Daniel
Completion/Unix/Command/_quilt | 50 +++++++++++++++++++++++++++++-----
1 file changed, 43 insertions(+), 7 deletions(-)
diff --git a/Completion/Unix/Command/_quilt b/Completion/Unix/Command/_quilt
index d086da715..8167bce1e 100644
--- a/Completion/Unix/Command/_quilt
+++ b/Completion/Unix/Command/_quilt
@@ -49,23 +49,59 @@ case $state in
(cmd)
# Divide the subcommands to categories. The categorization is our own;
# it's not based on any preexisting categorization in the quilt docs.
- local -a manip=( add delete edit fold fork import new refresh remove rename )
- local -a tree=( pop push revert )
- local -a other=( grep header mail setup snapshot upgrade )
- local -a interrogate=( annotate applied diff files graph next patches previous series top unapplied )
+ local -a manip=(
+ add:'add files to a patch'
+ delete:'remove a patch from the series'
+ edit:'add files to the topmost patch and open them in $EDITOR'
+ fold:'integrate an external patch into the topmost patch'
+ fork:'replace the topmost patch with a copy'
+ import:'add external patches to the series'
+ new:'add an empty patch to the series'
+ refresh:'update a patch with in-tree edits'
+ remove:'remove files from a given patch'
+ rename:"change a patch's name"
+ )
+ local -a tree=(
+ pop:'unapply a patch to the tree'
+ push:'apply a patch to the tree'
+ revert:'discard in-tree changes to files in a given patch'
+ )
+ local -a other=(
+ grep:'print file lines matching pattern'
+ header:"print or change a patch's prologue"
+ mail:'send patches by email'
+ setup:'initialize a source tree'
+ snapshot:'save a snapshot of the tree to diff against'
+ upgrade:'upgrade quilt metadata'
+ )
+ local -a interrogate=(
+ annotate:'show which patches modify which lines'
+ applied:'print the list of patches up to a given patch'
+ diff:'print differences between files'
+ files:'print the list of files that a given patch changes'
+ graph:'generate a patches dependency graph'
+ next:'print the name of the patch that follows a given patch'
+ patches:'print the list of patches that touch a given file'
+ previous:'print the name of the patch that precedes a given patch'
+ series:'print the list of all patches'
+ top:'print the name of the last applied patch'
+ unapplied:'print the list of patches following a given patch'
+ )
local -A cmdtypes=(
[manip]='series manipulator commands'
[tree]='tree manipulator commands'
[other]='other commands'
[interrogate]='series interrogator commands'
)
- local -a expl=( )
local ret=1
_tags ${cmdtypes// /-}
while _tags; do
for k in ${(ok)cmdtypes}; do
- _requested ${cmdtypes[$k]// /-} expl ${cmdtypes[$k]} \
- compadd -a - $k && ret=0
+ if _requested ${cmdtypes[$k]// /-}
+ then
+ _describe -t ${cmdtypes[$k]// /-} ${cmdtypes[$k]} $k &&
+ ret=0
+ fi
done
done
return ret
prev parent reply other threads:[~2020-03-26 0:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 0:53 [PATCH 1/2] _quilt: Categorize subcommands Daniel Shahaf
2020-03-26 0:53 ` Daniel Shahaf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200326005331.17708-2-danielsh@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).