mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
45623: _quilt: Add subcommand descriptions
This commit is contained in:
parent
174aedcf7f
commit
36df1e4f78
2 changed files with 46 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
||||||
2020-03-26 Daniel Shahaf <d.s@daniel.shahaf.name>
|
2020-03-26 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||||
|
|
||||||
|
* 45623: Completion/Unix/Command/_quilt: Add subcommand
|
||||||
|
descriptions
|
||||||
|
|
||||||
* 45622: Completion/Unix/Command/_quilt: Categorize subcommands
|
* 45622: Completion/Unix/Command/_quilt: Categorize subcommands
|
||||||
|
|
||||||
* 45584, 45620: Test/B12limit.ztst: zsh/rlimits: Skip the tests
|
* 45584, 45620: Test/B12limit.ztst: zsh/rlimits: Skip the tests
|
||||||
|
|
|
@ -49,23 +49,59 @@ case $state in
|
||||||
(cmd)
|
(cmd)
|
||||||
# Divide the subcommands to categories. The categorization is our own;
|
# Divide the subcommands to categories. The categorization is our own;
|
||||||
# it's not based on any preexisting categorization in the quilt docs.
|
# 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 manip=(
|
||||||
local -a tree=( pop push revert )
|
add:'add files to a patch'
|
||||||
local -a other=( grep header mail setup snapshot upgrade )
|
delete:'remove a patch from the series'
|
||||||
local -a interrogate=( annotate applied diff files graph next patches previous series top unapplied )
|
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=(
|
local -A cmdtypes=(
|
||||||
[manip]='series manipulator commands'
|
[manip]='series manipulator commands'
|
||||||
[tree]='tree manipulator commands'
|
[tree]='tree manipulator commands'
|
||||||
[other]='other commands'
|
[other]='other commands'
|
||||||
[interrogate]='series interrogator commands'
|
[interrogate]='series interrogator commands'
|
||||||
)
|
)
|
||||||
local -a expl=( )
|
|
||||||
local ret=1
|
local ret=1
|
||||||
_tags ${cmdtypes// /-}
|
_tags ${cmdtypes// /-}
|
||||||
while _tags; do
|
while _tags; do
|
||||||
for k in ${(ok)cmdtypes}; do
|
for k in ${(ok)cmdtypes}; do
|
||||||
_requested ${cmdtypes[$k]// /-} expl ${cmdtypes[$k]} \
|
if _requested ${cmdtypes[$k]// /-}
|
||||||
compadd -a - $k && ret=0
|
then
|
||||||
|
_describe -t ${cmdtypes[$k]// /-} ${cmdtypes[$k]} $k &&
|
||||||
|
ret=0
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in a new issue