mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 04:40:59 +01:00
30199: add (-.) to many completion _files globs
This commit is contained in:
parent
32eb4faf7c
commit
c5fce37bce
28 changed files with 82 additions and 63 deletions
|
|
@ -50,18 +50,18 @@ case $service in
|
|||
"--max_initiate+[specify peers needed before stopping initiating new connections]:peers:"\
|
||||
"--report_hash_failures+[report hash failures to user]:enable:(0 1)"\
|
||||
"--rarest_first_priority_cutoff+[specify peers which need to have a piece before other partials take priority over rarest first]:peers:"\
|
||||
':torrent file:_files -g "*.torrent"' \
|
||||
':torrent file:_files -g "*.torrent(-.)"' \
|
||||
&& return 0
|
||||
;;
|
||||
|
||||
# Next up are the torrent file manipulation programs.
|
||||
|
||||
btshowmetainfo)
|
||||
_files -g "*.torrent" && return 0
|
||||
_files -g "*.torrent(-.)" && return 0
|
||||
;;
|
||||
|
||||
btrename)
|
||||
_files -g '*.torrent' && return 0
|
||||
_files -g '*.torrent(-.)' && return 0
|
||||
;;
|
||||
|
||||
btmakemetafile)
|
||||
|
|
@ -74,7 +74,7 @@ case $service in
|
|||
;;
|
||||
|
||||
btreannounce)
|
||||
_files -g '*.torrent' && return 0
|
||||
_files -g '*.torrent(-.)' && return 0
|
||||
;;
|
||||
|
||||
# Lastly the tracker.
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@ _bogoutil() {
|
|||
{-y,--timestamp-date=}'[date for when unknown]:date in YYYYMMDD format' \
|
||||
'(--input-file -I)'{-I,--input-file=}'[input file]:input file:_files' \
|
||||
{-x,--debug-flags=}'[debug flags]:debug flags:' \
|
||||
"($_bogoutil_actions)"{-d,--dump=}'[print contents of db]:database file:_files -g "*.db"' \
|
||||
"($_bogoutil_actions)"{-d,--dump=}'[print contents of db]:database file:_files -g "*.db(-.)"' \
|
||||
"($_bogoutil_actions)"{-l,--load=}'[load file into db]:textfile:_files' \
|
||||
"($_bogoutil_actions)"{-u,--upgrade=}'[upgrade wordlist version]:database file:_files -g "*.db"' \
|
||||
"($_bogoutil_actions)"{-u,--upgrade=}'[upgrade wordlist version]:database file:_files -g "*.db(-.)"' \
|
||||
"($_bogoutil_actions)"'-m[perform maintenance functions]:file:_files' \
|
||||
"($_bogoutil_actions)"'-w[display token information]:database file or directory:_files' \
|
||||
"($_bogoutil_actions)"'-p[display token probability information]:database file or directory:_files' \
|
||||
"($_bogoutil_actions)"'-H[print histogram]:database file or directory:_files' \
|
||||
"($_bogoutil_actions)"'-r[recalculate ROBX]:database:_files -/' \
|
||||
"($_bogoutil_actions)"'-R[recalculate and save ROBX]:database:_files -/' \
|
||||
"($_bogoutil_actions)"{-k,--db-cachesize=}'[set Berkeley DB cache size]:size in MB:' \
|
||||
"($_bogoutil_actions)"{-k,--db-cachesize=}'[set Berkeley DB cache size]:size in MB' \
|
||||
"($_bogoutil_actions)"'--db-verify[verify database]:database:_files -/' \
|
||||
"($_bogoutil_actions)"'--db-recover[run regular recovery]:database:_files -/' \
|
||||
"($_bogoutil_actions)"'--db-recover-harder[run catastrophic recovery]:database:_files -/' \
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ common_args=(
|
|||
declare -ga common_toc_args
|
||||
common_toc_args=(
|
||||
$common_args
|
||||
':TOC file:_files -g "*.toc"')
|
||||
':TOC file:_files -g "*.toc(-.)"')
|
||||
|
||||
declare -ga common_device_args
|
||||
common_device_args=(
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ _arguments -s \
|
|||
'-r[toggle playlist repeat mode]' \
|
||||
'-R[toggle playlist random mode]' \
|
||||
'-v[toggle PCM and MASTER volume control]' \
|
||||
'*:playlist or directory or audio file:_files -g "*.(mp3|mp2|ogg|669|amf|ams|dsm|far|it|med|mod|mt2|mtm|okt|s3m|stm|ult|gdm|xm|m3u|pls|spx|wav|au)"'
|
||||
'*:playlist or directory or audio file:_files -g "*.(mp3|mp2|ogg|669|amf|ams|dsm|far|it|med|mod|mt2|mtm|okt|s3m|stm|ult|gdm|xm|m3u|pls|spx|wav|au)(-.)"'
|
||||
|
|
|
|||
|
|
@ -3636,7 +3636,7 @@ _git-index-pack () {
|
|||
'--stdin[read pack from stdin and instead write to specified file]' \
|
||||
$stdin_opts \
|
||||
'--strict[die if the pack contains broken objects or links]' \
|
||||
':pack file:_files -g "*.pack"'
|
||||
':pack file:_files -g "*.pack(-.)"'
|
||||
}
|
||||
|
||||
(( $+functions[_git-merge-file] )) ||
|
||||
|
|
@ -4075,7 +4075,7 @@ _git-pack-redundant () {
|
|||
'(:)--all[process all packs]' \
|
||||
'--alt-odb[do not require objects to be present in local packs]' \
|
||||
'--verbose[output some statistics to standard error]' \
|
||||
'(--all)*::packs:_files -g "*.pack"'
|
||||
'(--all)*::packs:_files -g "*.pack(-.)"'
|
||||
}
|
||||
|
||||
(( $+functions[_git-rev-list] )) ||
|
||||
|
|
|
|||
|
|
@ -420,8 +420,8 @@ _hg_cmd_backout() {
|
|||
'--parent[parent to choose when backing out merge]' \
|
||||
'(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
|
||||
'(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \
|
||||
'(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
|
||||
'(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt'
|
||||
'(--message -m)'{-m+,--message}'[specify commit message]:text' \
|
||||
'(--logfile -l)'{-l+,--logfile}'[read commit message from specified file]:log file:_files'
|
||||
}
|
||||
|
||||
_hg_cmd_bisect() {
|
||||
|
|
@ -472,8 +472,8 @@ _hg_cmd_clone() {
|
|||
_hg_cmd_commit() {
|
||||
_arguments -s -w : $_hg_global_opts $_hg_pat_opts \
|
||||
'(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
|
||||
'(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
|
||||
'(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
|
||||
'(--message -m)'{-m+,--message}'[specify commit message]:text' \
|
||||
'(--logfile -l)'{-l+,--logfile}'[read commit message from specified file]:log file:_files' \
|
||||
'(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
|
||||
'(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
|
||||
'*:file:_hg_files'
|
||||
|
|
|
|||
|
|
@ -28,5 +28,5 @@ fi
|
|||
|
||||
_arguments $args \
|
||||
'*: : _alternative
|
||||
"executables:executable:_files -g \^\*.so\(\*\)"
|
||||
"shared-objects:shared object:_files -g \*.so"'
|
||||
"executables:executable:_files -g \^\*.so\(\-*\)"
|
||||
"shared-objects:shared object:_files -g \*.so\(-.\)"'
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ _metaflac_opers=(
|
|||
)
|
||||
|
||||
_arguments "$_metaflac_opts[@]" \
|
||||
"*:FLAC file:_files -g \*.flac" \
|
||||
"*:FLAC file:_files -g \*.flac\(-.\)" \
|
||||
- "shortcuts" \
|
||||
"$_metaflac_shorts[@]" \
|
||||
- "(operations)" \
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ _arguments -s \
|
|||
123b 124b 125b 126b)' \
|
||||
'-c[match all but specified]' \
|
||||
'-d[match only directory but not contents]' \
|
||||
'-f:archive:_files -g "*.(tar|cpio)"' \
|
||||
'-f:archive:_files -g "*.(tar|cpio)(-.)"' \
|
||||
'-i[interactively rename files]' \
|
||||
'-j[filter archive through bzip2]' \
|
||||
'-k[do not overwrite existing files]' \
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ case "$service" in
|
|||
{-f,--force}'[force at least one compilation]' \
|
||||
'--inplace[compile the documents from their source directory]' \
|
||||
\*{-W,--warn}'=[report warnings of the given TYPE]:warnings:(all boxes misc refs)' \
|
||||
'*:LaTeX files:_files -g \*.\(tex\|dtx\|lhs\|w\)'
|
||||
'*:LaTeX files:_files -g "*.(tex|dtx|lhs|w)(-.)"'
|
||||
return 0
|
||||
;;
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ case "$service" in
|
|||
'--errors[show all errors that occured during compilation]' \
|
||||
'--refs[show the list of undefined references]' \
|
||||
'--warnings[show all LaTeX warnings]' \
|
||||
':LaTeX file:_files -g \*.\(tex\|dtx\|lhs\|w\)'
|
||||
':LaTeX file:_files -g "*.(tex|dtx|lhs|w)(-.)"'
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -59,4 +59,4 @@ _arguments -s -C -M 'r:|[_-]=* r:|=*' \
|
|||
'--to=dom[XML dom based input representation, experimental]' \
|
||||
'--convert=footnotes[embedded footnotes]' \
|
||||
'--to=current[current markup]' \
|
||||
'*:SiSU files:_files -g "*.(sst|ssm)(.)"'
|
||||
'*:SiSU files:_files -g "*.(sst|ssm)(-.)"'
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ case $state in
|
|||
_tags $tags
|
||||
while _tags; do
|
||||
if _requested files expl 'info file'; then
|
||||
_files "$expl[@]" $infopath -g '*.info' && ret=0
|
||||
_files "$expl[@]" $infopath -g '*.info(-.)' && ret=0
|
||||
fi
|
||||
if _requested items; then
|
||||
items=(${${(M)${${(f)"$(${info} --output - ${words[1,CURRENT-1]} 2>/dev/null)"}[1,(r)[[:space:]]#--- The Detailed Node Listing ---[[:space:]]#]}:#\* *~\* Menu:*}:/(#b)\*[[:space:]]##([^:]##):(#B)( \(?##\)[^.]#.|(:|))[[:space:]]#(#b)(*)[[:space:]]#/$match[1]${match[2]:+:}$match[2]})
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ arguments=(
|
|||
'-D[debugging mode]'
|
||||
'-n[no swap file (memory only)]'
|
||||
'-nb[start as NetBean server]'
|
||||
{-r,-L}'[list swap files and exit or recover from a swap file]::swap file:_vim_files -g \*.sw\?'
|
||||
{-r,-L}'[list swap files and exit or recover from a swap file]::swap file:_vim_files -g "*.sw?(-.)"'
|
||||
'( -H -F)-A[start in Arabic mode]'
|
||||
'(-A -F)-H[start in Hebrew mode]'
|
||||
'(-A -H )-F[start in Farsi mode]'
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ _arguments \
|
|||
'(-l)-w[overwrite comments]' \
|
||||
'(-l -c)-t[tag and value]:: ' \
|
||||
'(-l -t)-c[tag file]::_files' \
|
||||
'1:OGG file:_files -g \*.ogg' \
|
||||
'(-l)2:output OGG file:_files -g \*.ogg' \
|
||||
'1:OGG file:_files -g "*.ogg(-.)"' \
|
||||
'(-l)2:output OGG file:_files -g "*.ogg(-.)"' \
|
||||
&& return 0
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ _xmms2_radd() {
|
|||
_xmms2_addpls() {
|
||||
local expl
|
||||
_description files expl 'playlist'
|
||||
_files "$expl[@]" -g '*.([mM]3[uU]|[pP][lL][sS])'
|
||||
_files "$expl[@]" -g '*.([mM]3[uU]|[pP][lL][sS])(-.)'
|
||||
}
|
||||
|
||||
_xmms2() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue