From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 28438 invoked from network); 26 Mar 2020 00:54:32 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 26 Mar 2020 00:54:32 -0000 Received: (qmail 11842 invoked by alias); 26 Mar 2020 00:54:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45623 Received: (qmail 21072 invoked by uid 1010); 26 Mar 2020 00:54:11 -0000 X-Qmail-Scanner-Diagnostics: from out5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25758. spamassassin: 3.4.2. Clear:RC:0(66.111.4.29):SA:0(-2.6/5.0):. Processed in 1.40675 secs); 26 Mar 2020 00:54:11 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehhedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgogfeguddtqddvjeculdegtddmnecujfgurhephf fvufffkffojghfggfgsedtkedttdertddtnecuhfhrohhmpeffrghnihgvlhcuufhhrghh rghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfkphepjeelrd dujeeirdduvdehrddvfedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH 2/2] _quilt: Add subcommand descriptions Date: Thu, 26 Mar 2020 00:53:31 +0000 Message-Id: <20200326005331.17708-2-danielsh@tarpaulin.shahaf.local2> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200326005331.17708-1-danielsh@tarpaulin.shahaf.local2> References: <20200326005331.17708-1-danielsh@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmail-Scanner-2.11: added fake Content-Type header Content-Type: text/plain --- 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