mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-02 06:40:55 +01:00
zsh-workers/7500
This commit is contained in:
parent
5e5e9e12c5
commit
4d86ee0d40
3 changed files with 83 additions and 70 deletions
|
|
@ -226,7 +226,11 @@ while [[ cur -gt 0 ]]; do
|
|||
def="$opts[$ws[1]]"
|
||||
optbeg="$beg"
|
||||
argbeg="$beg"
|
||||
inopt=yes
|
||||
if [[ -n "$def" ]]; then
|
||||
inopt=yes
|
||||
else
|
||||
inopt=''
|
||||
fi
|
||||
[[ -n "$oneshot[$ws[1]]" ]] && unset "opts[$ws[1]]"
|
||||
else
|
||||
uns=''
|
||||
|
|
@ -236,7 +240,11 @@ while [[ cur -gt 0 ]]; do
|
|||
def="$opts[$tmp]"
|
||||
optbeg="$beg"
|
||||
argbeg="$beg"
|
||||
inopt=yes
|
||||
if [[ -n "$def" ]]; then
|
||||
inopt=yes
|
||||
else
|
||||
inopt=''
|
||||
fi
|
||||
uns="${ws[1][2,-1]}"
|
||||
opt=''
|
||||
fi
|
||||
|
|
@ -283,6 +291,7 @@ while [[ cur -gt 0 ]]; do
|
|||
inopt=yes
|
||||
else
|
||||
def=''
|
||||
inopt=''
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -318,11 +327,15 @@ while [[ cur -gt 0 ]]; do
|
|||
def="${def#?*[^\\]:*[^\\]:}"
|
||||
optbeg="$beg"
|
||||
argbeg="$beg"
|
||||
inopt=yes
|
||||
else
|
||||
def=''
|
||||
fi
|
||||
fi
|
||||
if [[ -n "$def" ]]; then
|
||||
inopt=yes
|
||||
else
|
||||
inopt=''
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -453,7 +466,7 @@ else
|
|||
(( $#tmp )) && unset "$tmp[@]"
|
||||
fi
|
||||
|
||||
if [[ -n "$opt" ]]; then
|
||||
if [[ -n "$opt" && "$def" != \** ]]; then
|
||||
|
||||
# We aren't in an argument directly after a option name, so
|
||||
# all option names are possible matches.
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
#autoload
|
||||
|
||||
typeset -A commands
|
||||
commands=(add "ad new" admin "adm rcs" annotate ann
|
||||
checkout "co get" commit "ci com" diff "di dif"
|
||||
edit "" editors "" export "exp ex"
|
||||
history "hi his" import "im imp" init ""
|
||||
log "lo rlog" login "logon lgn" logout ""
|
||||
rdiff patch release "re rel" remove "rm delete"
|
||||
status "st stat" rtag "rt rfreeze" tag "ta freeze"
|
||||
unedit "" update "up upd" watch ""
|
||||
watchers "")
|
||||
typeset -A cmds
|
||||
cmds=(add "ad new" admin "adm rcs" annotate ann
|
||||
checkout "co get" commit "ci com" diff "di dif"
|
||||
edit "" editors "" export "exp ex"
|
||||
history "hi his" import "im imp" init ""
|
||||
log "lo rlog" login "logon lgn" logout ""
|
||||
rdiff patch release "re rel" remove "rm delete"
|
||||
status "st stat" rtag "rt rfreeze" tag "ta freeze"
|
||||
unedit "" update "up upd" watch ""
|
||||
watchers "")
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
compadd ${(k)commands} || compadd ${(kv)=commands}
|
||||
compadd ${(k)cmds} || compadd ${(kv)=cmds}
|
||||
else
|
||||
case "$words[1]" in
|
||||
add|ad|new) _cvs_add;;
|
||||
|
|
|
|||
|
|
@ -1,59 +1,59 @@
|
|||
#compdef find
|
||||
|
||||
_arguments \
|
||||
'-daystart' \
|
||||
'-depth' \
|
||||
'-follow' \
|
||||
'-help' \
|
||||
'-maxdepth:maximum search depth:' \
|
||||
'-mindepth:minimum search depth:' \
|
||||
'-mount' \
|
||||
'-noleaf' \
|
||||
'-version' \
|
||||
'-xdev' \
|
||||
'-amin:access time (minutes):' \
|
||||
'-cmin:inode change time (minutes):' \
|
||||
'-mmin:modification time (minutes):' \
|
||||
'-atime:access time (days):' \
|
||||
'-ctime:inode change time (days):' \
|
||||
'-mtime:modification time (days):' \
|
||||
'-anewer:file to compare (access time):_files' \
|
||||
'-cnewer:file to compare (inode change time):_files' \
|
||||
'-newer:file to compare (modification time):_files' \
|
||||
'-used:access after inode change (days):' \
|
||||
'-empty' \
|
||||
'-false' \
|
||||
'-fstype:filesystem type:(ufs 4.2 4.3 nfs tmp mfs S51K S52K)' \
|
||||
'-gid:numeric group ID:' \
|
||||
'-group:group:_groups' \
|
||||
'-uid:numeric user ID:' \
|
||||
'-user:user:_users' \
|
||||
'-lname:link pattern to search:' \
|
||||
'-ilname:link pattern to search (case insensitive):' \
|
||||
'-name:name pattern to search:' \
|
||||
'-iname:name pattern to search (case insensitive):' \
|
||||
'-path:path pattern to search:' \
|
||||
'-ipath:path pattern to search (case insensitive):' \
|
||||
'-regex:regular expression to search:' \
|
||||
'-iregex:regular expression to search (case insensitive):' \
|
||||
'-inum:inode number:' \
|
||||
'-links:number of links:' \
|
||||
'-nouser' \
|
||||
'-nogroup' \
|
||||
'-perm:file permission bits:' \
|
||||
'-size:file size:' \
|
||||
'-true' \
|
||||
'-type:file type:(b c d p f l s)' \
|
||||
'-xtype:file type:(b c d p f l s)' \
|
||||
'-exec:program: _command_names -e:*\;::program arguments: _normal' \
|
||||
'-ok:program: _command_names -e:*\;::program arguments: _normal' \
|
||||
'-fls:output file:_files' \
|
||||
'-fprint:output file:_files' \
|
||||
'-fprint0:output file:_files' \
|
||||
'-fprintf:output file:_files:output format:' \
|
||||
'-print' \
|
||||
'-print0' \
|
||||
'-printf:output format:' \
|
||||
'-prune' \
|
||||
'-ls' \
|
||||
'*-daystart' \
|
||||
'*-depth' \
|
||||
'*-follow' \
|
||||
'*-help' \
|
||||
'*-maxdepth:maximum search depth:' \
|
||||
'*-mindepth:minimum search depth:' \
|
||||
'*-mount' \
|
||||
'*-noleaf' \
|
||||
'*-version' \
|
||||
'*-xdev' \
|
||||
'*-amin:access time (minutes):' \
|
||||
'*-cmin:inode change time (minutes):' \
|
||||
'*-mmin:modification time (minutes):' \
|
||||
'*-atime:access time (days):' \
|
||||
'*-ctime:inode change time (days):' \
|
||||
'*-mtime:modification time (days):' \
|
||||
'*-anewer:file to compare (access time):_files' \
|
||||
'*-cnewer:file to compare (inode change time):_files' \
|
||||
'*-newer:file to compare (modification time):_files' \
|
||||
'*-used:access after inode change (days):' \
|
||||
'*-empty' \
|
||||
'*-false' \
|
||||
'*-fstype:filesystem type:(ufs 4.2 4.3 nfs tmp mfs S51K S52K)' \
|
||||
'*-gid:numeric group ID:' \
|
||||
'*-group:group:_groups' \
|
||||
'*-uid:numeric user ID:' \
|
||||
'*-user:user:_users' \
|
||||
'*-lname:link pattern to search:' \
|
||||
'*-ilname:link pattern to search (case insensitive):' \
|
||||
'*-name:name pattern to search:' \
|
||||
'*-iname:name pattern to search (case insensitive):' \
|
||||
'*-path:path pattern to search:' \
|
||||
'*-ipath:path pattern to search (case insensitive):' \
|
||||
'*-regex:regular expression to search:' \
|
||||
'*-iregex:regular expression to search (case insensitive):' \
|
||||
'*-inum:inode number:' \
|
||||
'*-links:number of links:' \
|
||||
'*-nouser' \
|
||||
'*-nogroup' \
|
||||
'*-perm:file permission bits:' \
|
||||
'*-size:file size:' \
|
||||
'*-true' \
|
||||
'*-type:file type:(b c d p f l s)' \
|
||||
'*-xtype:file type:(b c d p f l s)' \
|
||||
'*-exec:program: _command_names -e:*\;::program arguments: _normal' \
|
||||
'*-ok:program: _command_names -e:*\;::program arguments: _normal' \
|
||||
'*-fls:output file:_files' \
|
||||
'*-fprint:output file:_files' \
|
||||
'*-fprint0:output file:_files' \
|
||||
'*-fprintf:output file:_files:output format:' \
|
||||
'*-print' \
|
||||
'*-print0' \
|
||||
'*-printf:output format:' \
|
||||
'*-prune' \
|
||||
'*-ls' \
|
||||
'*:directory:_files -/'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue