From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10190 invoked from network); 1 Apr 2001 16:15:32 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Apr 2001 16:15:32 -0000 Received: (qmail 15507 invoked by alias); 1 Apr 2001 16:15:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13863 Received: (qmail 15494 invoked from network); 1 Apr 2001 16:15:25 -0000 Sender: opk Message-ID: <3AC7458F.FC76349E@u.genie.co.uk> Date: Sun, 01 Apr 2001 16:13:19 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.18 i586) X-Accept-Language: en MIME-Version: 1.0 To: Zsh workers Subject: PATCH: various minor fixes Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This patch does a few small things including typo fixes and a couple of rewordings in the manual and a few small changes to completion functions including some -A "-*" and -S options to _arguments. In the process, I noticed a bug with the -S option to _arguments: bzip2 -- now says 'no more arguments' where I would expect it to complete long options. _arguments -S should look for '--' as a complete, finished word. Also, gzip - seems to move the cursor back over the minus. Oliver Index: Completion/Builtins/_bindkey =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_bindkey,v retrieving revision 1.5 diff -u -r1.5 _bindkey --- Completion/Builtins/_bindkey 2000/05/31 09:38:26 1.5 +++ Completion/Builtins/_bindkey 2001/04/01 16:08:40 @@ -7,31 +7,34 @@ # # Where appropriate, will complete keymaps instead of widgets. -local state expl line curcontext="$curcontext" +local state expl line curcontext="$curcontext" ret=1 typeset -A opt_args -_arguments -C -s \ - '(-v -a -M -l -D -A -N)-e[select emacs keymap and bind it to main]' \ - '(-e -a -M -l -D -A -N)-v[select viins keymap and bind it to main]' \ - '(-e -v -M -l -D -A -N)-a[select vicmd keymap]' \ - '(-e -v -a -l -D -A -N)-M[specify keymap to select]:keymap:->keymap' \ - '(-e -v -a -M -D -A -N -m -r -s -R *)-l[list existing keymap names]' \ +_arguments -C -s -S \ + '(-v -a -M -l -D -A -N -p)-e[select emacs keymap and bind it to main]' \ + '(-e -a -M -l -D -A -N -p)-v[select viins keymap and bind it to main]' \ + '(-e -v -M -l -D -A -N -p)-a[select vicmd keymap]' \ + '(-e -v -a -l -D -A -N -p)-M[specify keymap to select]:keymap:->keymap' \ + '(-e -v -a -M -D -A -N -m -p -r -s -R *)-l[list existing keymap names]' \ '(-e -v -a -d -A -N -m -r -s -R *)-L[output in form of bindkey commands]' \ - '(-e -v -a -l -D -A -N -m -r -s -R *)-d[delete existing keymaps and reset to default state]' \ - '(-e -v -a -M -l -d -A -N -m -r -s -R *)-D[delete named keymaps]:*:keymap:->keymap' \ - '(-e -v -a -M -l -L -d -D -N -m -r -s -R *)-A[create alias to keymap]:old-keymap:->keymap:new-keymap:->keymap' \ - '(-e -v -a -M -l -L -d -D -A -m -r -s -R *)-N[create new keymap]:new-keymap:->keymap:old-keymap to copy:->keymap' \ - '(-l -L -d -D -A -N -r -s -r -R *)-m[add builtin meta-key bindings to selected keymape]' \ - '(-l -L -d -D -A -N -m -s *)-r[unbind specified in-strings]:*:in-string' \ - '(-l -L -d -D -A -N -m -r *)-s[bind each in-string to each out-string]:*:key string' \ - '(-e -v -a -M -l -L -d -D -A -N -m)-R[interpret in-strings as ranges]' \ - '(-l -L -d -A -N -m -r -s)*::widgets:->widget' && return 0 + '(-e -v -a -l -D -A -N -m -p -r -s -R *)-d[delete existing keymaps and reset to default state]' \ + '(-e -v -a -M -l -d -A -N -m -p -r -s -R *)-D[delete named keymaps]:*:keymap:->keymap' \ + '(-e -v -a -M -l -L -d -D -N -m -p -r -s -R *)-A[create alias to keymap]:old-keymap:->keymap:new-keymap:->keymap' \ + '(-e -v -a -M -l -L -d -D -A -m -p -r -s -R *)-N[create new keymap]:new-keymap:->keymap:old-keymap to copy:->keymap' \ + '(-l -L -d -D -A -N -p -r -s -r -R *)-m[add builtin meta-key bindings to selected keymape]' \ + '(-e -v -a -M -d -D -A -N -m -r -s -R *)-p[list bindings which have given key sequence as a prefix]:key sequence' \ + '(-l -L -d -D -A -N -m -p -s *)-r[unbind specified in-strings]:*:in-string' \ + '(-l -L -d -D -A -N -m -p -r *)-s[bind each in-string to each out-string]:*:key string' \ + '(-e -v -a -M -l -L -d -D -A -N -m -p)-R[interpret in-strings as ranges]' \ + '(-l -L -d -A -N -m -p -r -s)*::widgets:->widget' && ret=0 case $state in keymap) - _wanted -C -M keymaps expl keymap compadd -a keymaps + _wanted -C -M keymaps expl keymap compadd -a keymaps && ret=0 ;; widget) - _wanted widgets expl widget compadd -M 'r:|-=* r:|=*' -k widgets + _wanted widgets expl widget compadd -M 'r:|-=* r:|=*' -k widgets && ret=0 ;; esac + +return ret Index: Completion/Builtins/_compdef =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_compdef,v retrieving revision 1.8 diff -u -r1.8 _compdef --- Completion/Builtins/_compdef 2000/10/06 13:01:53 1.8 +++ Completion/Builtins/_compdef 2001/04/01 16:08:40 @@ -3,7 +3,7 @@ local state line expl list disp curcontext="$curcontext" typeset -A opt_args -_arguments -C -s \ +_arguments -C -s -A "-*" -S \ '(-d)-a[make function autoloadable]' \ '(-d -p -P)-n[leave existing definitions intact]' \ ':completion function:->cfun' \ Index: Completion/Builtins/_disable =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_disable,v retrieving revision 1.2 diff -u -r1.2 _disable --- Completion/Builtins/_disable 2000/04/01 20:43:43 1.2 +++ Completion/Builtins/_disable 2001/04/01 16:08:40 @@ -1,6 +1,6 @@ #compdef disable -_arguments -C -s \ +_arguments -C -s -A "-*" -S \ "(-f -r)-a[act on aliases]:*:aliases:(${(k)aliases} ${(k)galiases})" \ "(-a -r)-f[act on functions]:*:functions:(${(k)functions})" \ "(-a -f)-r[act on reserved words]:*:reserved-words:(${(k)reswords})" \ Index: Completion/Builtins/_emulate =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_emulate,v retrieving revision 1.2 diff -u -r1.2 _emulate --- Completion/Builtins/_emulate 2000/04/25 09:48:09 1.2 +++ Completion/Builtins/_emulate 2001/04/01 16:08:40 @@ -1,6 +1,6 @@ #compdef emulate -_arguments -C -s \ +_arguments -C -s -A "-*" \ '-L[set local_options and local_traps as well]' \ '-R[reset all options instead of only those needed for script portability]' \ '::shell to emulate:(zsh sh ksh csh)' Index: Completion/Builtins/_enable =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_enable,v retrieving revision 1.2 diff -u -r1.2 _enable --- Completion/Builtins/_enable 2000/04/01 20:43:43 1.2 +++ Completion/Builtins/_enable 2001/04/01 16:08:40 @@ -1,6 +1,6 @@ #compdef enable -_arguments -C -s \ +_arguments -C -s -A "-*" -S \ "(-f -r)-a[act on aliases]:*:aliases:(${(k)dis_aliases})" \ "(-a -r)-f[act on functions]:*:functions:(${(k)dis_functions})" \ "(-a -f)-r[act on reserved words]:*:reserved-words:(${(k)dis_reswords})" \ Index: Completion/Builtins/_fc =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_fc,v retrieving revision 1.3 diff -u -r1.3 _fc --- Completion/Builtins/_fc 2001/02/26 13:02:30 1.3 +++ Completion/Builtins/_fc 2001/04/01 16:08:40 @@ -1,27 +1,36 @@ -#compdef fc history +#compdef fc history r -local fc_common +local expl fc_common fc_hist fc_r -fc_common=( \ - '(-A -R -W -I)-m[treat first argument as a pattern]' \ - '(-A -R -W -I)-r[reverse order of the commands]' \ - '(-A -R -W -I -e)-n[suppress line numbers]' \ - '(-A -R -W -I -e -f -E -i)-d[print time-stamps]' \ - '(-A -R -W -I -e -d -E -i)-f[mm/dd/yyyy format time-stamps]' \ - '(-A -R -W -I -e -d -f -i)-E[dd.mm.yyyy format time-stamps]' \ - '(-A -R -W -I -e -d -f -E)-i[yyyy-mm-dd format time-stamps]' \ - '(-A -R -W -I -e)-D[print elapsed times]' \ +fc_common=( + '(-A -R -W -I)-r[reverse order of the commands]' + '(-A -R -W -I -e)-n[suppress line numbers]' '(-A -R -W -I)*::commands:_command_names -e' ) -if [[ $service = *history ]]; then - _arguments -C -s "$fc_common[@]" -else - _arguments -C -s \ - '(-A -R -W -I -e)-l[list resulting commands on stdout]' \ +fc_hist=( \ + '(-A -R -W -I)-m[treat first argument as a pattern]' + '(-A -R -W -I -e -f -E -i)-d[print time-stamps]' + '(-A -R -W -I -e -d -E -i)-f[mm/dd/yyyy format time-stamps]' + '(-A -R -W -I -e -d -f -i)-E[dd.mm.yyyy format time-stamps]' + '(-A -R -W -I -e -d -f -E)-i[yyyy-mm-dd format time-stamps]' + '(-A -R -W -I -e)-D[print elapsed times]' ) + +fc_r='(-A -R -W -I -e)-l[list resulting commands on stdout]' + +case $service in + history) + _arguments -C -s -S "$fc_common[@]" "$fc_hist[@]" && return 0 + ;; + r) + _arguments -C -s -S "$fc_common[@]" "$fc_r" && return 0 + ;; + *) + _arguments -C -s -S \ '(-A -R -W -I -l -n -d -f -E -i -D)-e[specify editor to invoke]:editor to invoke:_command_names -e' \ '(-l -m -e -r -n -d -f -E -i -D -A -W *)-R[read history from file]:history file:_files' \ '(-l -m -e -r -n -d -f -E -i -D -R -W *)-A[append history to file]:history file:_files' \ '(-l -m -e -r -n -d -f -E -i -D -R -A *)-W[write history to file]:history file:_files' \ '(-l -m -e -r -n -d -f -E -i -D -A -W *)-I[read/write new events only]:history file:_files' \ - "$fc_common[@]" -fi + "$fc_common[@]" "$fc_hist[@]" "$fc_r" && return 0 + ;; +esac Index: Completion/Builtins/_hash =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_hash,v retrieving revision 1.7 diff -u -r1.7 _hash --- Completion/Builtins/_hash 2001/02/26 13:02:30 1.7 +++ Completion/Builtins/_hash 2001/04/01 16:08:40 @@ -9,13 +9,13 @@ case ${service} in hash) - _arguments -C -s \ + _arguments -C -s -S \ '(-f -m -v)-r[empty hash table]' \ '(-f -r)-m[treat arguments as patterns]' \ '(-f -r -m)-v[list entires as they are added]' \ '(-f -r -v)-L[list in the form of calls to hash]' \ "${common_args[@]}" \ - '(-d -f -r -m -v)*:hash:->hashval' && return 0 + '(-d -f -r -m -v -L)*:hash:->hashval' && return 0 ;; rehash) _arguments -C -s ${common_args[@]} && return 0 Index: Completion/Builtins/_print =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_print,v retrieving revision 1.2 diff -u -r1.2 _print --- Completion/Builtins/_print 2000/04/20 00:48:28 1.2 +++ Completion/Builtins/_print 2001/04/01 16:08:41 @@ -9,7 +9,7 @@ (:>&p) 2>/dev/null && pflag='(-s -u -z)-p[print arguments to input of coprocess]' -_arguments -C -s \ +_arguments -C -s -A "-*" -S \ '-r[ignore escape conventions of echo]' \ '(-r -b -m -s -l -N -o -O -i -c -u -p -z -D -P)-R[emulate BSD echo (no escapes, -n & -e flags only)]' \ '-b[recognise bindkey escape sequences]' \ Index: Completion/Builtins/_read =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_read,v retrieving revision 1.1 diff -u -r1.1 _read --- Completion/Builtins/_read 2000/08/09 21:20:41 1.1 +++ Completion/Builtins/_read 2001/04/01 16:08:41 @@ -6,7 +6,7 @@ (:>&p) 2>/dev/null && pflag='(-q -u -z)-p[input is read from the coprocess]' -_arguments -C -s \ +_arguments -C -s -A "-*" -S \ '-r[raw mode]' \ '(-p -k -u -z)-q[read y or n character from terminal]' \ '(-q)-k[specify number of characters to read]:number of characters' \ Index: Completion/Builtins/_unhash =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_unhash,v retrieving revision 1.4 diff -u -r1.4 _unhash --- Completion/Builtins/_unhash 2000/07/05 21:05:58 1.4 +++ Completion/Builtins/_unhash 2001/04/01 16:08:41 @@ -2,12 +2,12 @@ local expl state line curcontext="$curcontext" -_arguments -C -s \ +_arguments -C -s -S \ '(-a -f *)-d[remove named directories]:*:named directory:->nameddir' \ '(-d -f *)-a[remove aliases]:*:aliases:_aliases' \ '(-d -a *)-f[remove functions]:*:functions:_functions' \ '-m[treat arguments as patterns]' \ - '*:commands: _command_names -e' && return 0 + '(-a -d -f -m)*:commands: _command_names -e' && return 0 [[ "$state" = nameddir ]] && _wanted named-directories expl 'named directory' compadd -k nameddirs Index: Completion/Builtins/_vars_eq =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_vars_eq,v retrieving revision 1.8 diff -u -r1.8 _vars_eq --- Completion/Builtins/_vars_eq 2001/02/22 14:28:47 1.8 +++ Completion/Builtins/_vars_eq 2001/04/01 16:08:41 @@ -53,7 +53,7 @@ ${allargs[${use[$i]}${${(s::)use[$i]}[(r)[Uut]]:+$func}]} ) done -_arguments -C -s "${args[@]}" '*:vars:->vars_eq' +_arguments -C -s -A "-*" -S "${args[@]}" '*:vars:->vars_eq' if [[ "$state" = vars_eq ]]; then if [[ $func = f ]]; then Index: Completion/Builtins/_which =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_which,v retrieving revision 1.4 diff -u -r1.4 _which --- Completion/Builtins/_which 2001/02/26 13:02:30 1.4 +++ Completion/Builtins/_which 2001/04/01 16:08:42 @@ -13,14 +13,14 @@ case ${service} in whence) - _arguments -C -s \ + _arguments -C -s -A "-*" -S \ '(-c -w)-v[verbose output]' \ '(-v -w)-c[csh-like output]' \ "${cargs[@]}" "$farg" "$aarg" && return 0 ;; - where) _arguments -C -s "${cargs[@]}" && return 0;; - which) _arguments -C -s "${cargs[@]}" "$aarg" && return 0;; - type) _arguments -C -s "${cargs[@]}" "$aarg" "$farg" && return 0;; + where) _arguments -C -s -A "-*" -S "${cargs[@]}" && return 0;; + which) _arguments -C -s -A "-*" -S "${cargs[@]}" "$aarg" && return 0;; + type) _arguments -C -s -A "-*" -S "${cargs[@]}" "$aarg" "$farg" && return 0;; esac if [[ "$state" = command ]]; then Index: Completion/Builtins/_zcompile =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zcompile,v retrieving revision 1.5 diff -u -r1.5 _zcompile --- Completion/Builtins/_zcompile 2000/05/31 09:38:26 1.5 +++ Completion/Builtins/_zcompile 2001/04/01 16:08:42 @@ -1,9 +1,9 @@ #compdef zcompile -local state line expl curcontext="$curcontext" +local state line expl curcontext="$curcontext" ret=1 typeset -A opt_args -_arguments -C -s \ +_arguments -C -s -A "-*" -S \ '(-t -c -m -a)-U[don'\''t expand aliases]' \ '(-t -M)-R[mark as read]' \ '(-t -R)-M[mark as mapped]' \ @@ -14,11 +14,13 @@ '(-t -U -z -k)-a[write autoload functions]' \ '(-M -R -U -z -k -a -c -m)-t[show table of contents]' \ ':zwc file:_files' \ - '*:function:->function' && return 0 + '*:function:->function' && ret=0 if (( $+opt_args[-c] )); then - _wanted functions expl 'function to write' compadd -k functions + _wanted functions expl 'function to write' compadd -k functions && ret=0 else _description files expl 'zsh source file' - _files "$expl[@]" + _files "$expl[@]" && ret=0 fi + +return ret Index: Completion/Builtins/_zle =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zle,v retrieving revision 1.3 diff -u -r1.3 _zle --- Completion/Builtins/_zle 2000/09/11 07:08:28 1.3 +++ Completion/Builtins/_zle 2001/04/01 16:08:42 @@ -15,7 +15,7 @@ opts=(-A -C -D -L -M -N -R -U -a -c -l \* :) -_arguments -s \ +_arguments -s -S \ "($opts)-A[define widget alias]:old widget:->widget :new widget:->widget" \ "($opts)-C[define completion widget]:new widget name:->comp-widget :completion widget:->builtin-comp-widget :widget shell function:->function" \ "($opts)-D[delete widget]:*:widget:->widget" \ @@ -30,7 +30,7 @@ '(-)::widget name:->call' [[ $state == listing ]] && - _arguments -s \ + _arguments -s -S \ "-l[list user-defined widgets]" \ "(-a)-L[list as commands]" \ "(-L)-a[list all widgets]" \ Index: Completion/Builtins/_zpty =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zpty,v retrieving revision 1.9 diff -u -r1.9 _zpty --- Completion/Builtins/_zpty 2000/08/10 21:22:25 1.9 +++ Completion/Builtins/_zpty 2001/04/01 16:08:42 @@ -4,7 +4,7 @@ typeset -A opt_args -_arguments -C -s \ +_arguments -C -s -S \ '(-r -w -L -d)-e[echo input characters]' \ '(-r -w -L -d)-b[io to pseudo-terminal blocking]' \ '(-r -w -L -e -b)-d[delete command]:*:name:->name' \ @@ -17,7 +17,7 @@ # One could use sets, but that's more expensive and zpty is simple enough. # -# _arguments -C -s \ +# _arguments -C -s -S \ # - read \ # '-r[read string from command]' \ # ':name:->name' \ Index: Completion/Builtins/_zstyle =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zstyle,v retrieving revision 1.24 diff -u -r1.24 _zstyle --- Completion/Builtins/_zstyle 2000/11/27 16:53:00 1.24 +++ Completion/Builtins/_zstyle 2001/04/01 16:08:43 @@ -17,12 +17,17 @@ avoid-completer c: break-keys c: cache-path 'c:_wanted directories expl directory _path_files -/' + cache-policy c:_functions + call-command c:bool command c:command + commands c: + complete c:bool completer c:completer completions c:bool condition c:bool cursor c:cursor disable-stat c:bool + disabled c:bool domains c: expand c: fake-files c:fake-files @@ -32,6 +37,7 @@ force-list c: format c: glob c:bool + global c:bool group-name c: group-order c:tag groups c:_groups @@ -69,7 +75,8 @@ ports c:_ports prefix-hidden c:bool prefix-needed c:bool - prompt c: + range c: + regular c:bool remote-access c:bool remove-all-dups c:bool select-prompt c: Index: Completion/User/_bison =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/User/_bison,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 _bison --- Completion/User/_bison 1999/10/21 12:54:30 1.1.1.3 +++ Completion/User/_bison 2001/04/01 16:08:43 @@ -1,6 +1,6 @@ #compdef bison -_arguments -s \ +_arguments -s -S \ '(--file-prefix)-b+[specify output file prefix]:output file prefix:' \ '(--defines)-d[write token definition file]' \ '(--raw)-r[output bison token numbers]' \ Index: Completion/User/_bzip2 =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/User/_bzip2,v retrieving revision 1.5 diff -u -r1.5 _bzip2 --- Completion/User/_bzip2 2001/01/15 09:11:33 1.5 +++ Completion/User/_bzip2 2001/04/01 16:08:43 @@ -6,7 +6,7 @@ case "$service" in bzip2recover) [[ $CURRENT = 2 ]] && state=files;; bzip2) decompress=no;& - bunzip2) _arguments -C -s \ + bunzip2) _arguments -C -s -S \ '(--help)-h[display help message]' \ '(-h)--help[display help message]' \ '(--decompress --compress -z --test -t)-d[decompress]' \ @@ -47,7 +47,7 @@ (( $+opt_args[-z] || $+opt_args[--compress] )) && decompress=no (( $+opt_args[-d] || $+opt_args[--decompress] || $+opt_args[-t] || $+opt_args[--test] )) && unset decompress - if [[ -z "$decompress" ]] ; then + if [[ -z "$decompress" ]]; then _description files expl 'compressed file' _files "$expl[@]" -g '*.bz2' && return 0 else Index: Completion/User/_dirs =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/User/_dirs,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 _dirs --- Completion/User/_dirs 1999/09/22 12:35:44 1.1.1.1 +++ Completion/User/_dirs 2001/04/01 16:08:43 @@ -1,3 +1,3 @@ -#compdef rmdir df du dircmp +#compdef rmdir df du dircmp dirs _files -/ Index: Completion/User/_fetchmail =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/User/_fetchmail,v retrieving revision 1.1 diff -u -r1.1 _fetchmail --- Completion/User/_fetchmail 2001/03/11 22:53:41 1.1 +++ Completion/User/_fetchmail 2001/04/01 16:08:44 @@ -1,6 +1,6 @@ #compdef fetchmail -_arguments \ +_arguments -S \ {--bsmtp,'(--logfile)-L','(-L)--logfile','(--fetchmailrc)-f','(-f)--fetchmailrc','(--idfile)-i','(-i)--idfile'}':file:_files' \ {--plugin,--plugout,'(--mda)-m','(-m)--mda'}':command:_command_names -e' \ {'(--username)-u','(-u)--username'}:user:_users \ Index: Completion/User/_gzip =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/User/_gzip,v retrieving revision 1.5 diff -u -r1.5 _gzip --- Completion/User/_gzip 2001/02/08 15:33:27 1.5 +++ Completion/User/_gzip 2001/04/01 16:08:44 @@ -8,7 +8,7 @@ decompress=yes ;& gzip) - _arguments -C -s \ + _arguments -C -s -S \ '(--to-stdout --stdout)-c[write on standard output]' \ '(-c --stdout)--to-stdout[write on standard output]' \ '(-c --to-stdout)--stdout[write on standard output]' \ Index: Doc/Zsh/builtins.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/builtins.yo,v retrieving revision 1.24 diff -u -r1.24 builtins.yo --- Doc/Zsh/builtins.yo 2001/03/29 05:00:09 1.24 +++ Doc/Zsh/builtins.yo 2001/04/01 16:08:59 @@ -258,6 +258,8 @@ these escape sequences. In the latter case, tt(-e) flag can be used to enable them. ) +module(echotc)(zsh/termcap) +module(echoti)(zsh/terminfo) findex(emulate) cindex(compatibility, sh) cindex(compatibility, ksh) @@ -938,8 +940,6 @@ until it receives a tt(SIGCONT). Unless the tt(-f) option is given, this will refuse to suspend a login shell. ) -module(termcap)(zsh/termcap) -module(terminfo)(zsh/terminfo) findex(test) xitem(tt(test) [ var(arg) ... ]) item(tt([) [ var(arg) ... ] tt(]))( Index: Doc/Zsh/compsys.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v retrieving revision 1.114 diff -u -r1.114 compsys.yo --- Doc/Zsh/compsys.yo 2001/03/28 12:17:13 1.114 +++ Doc/Zsh/compsys.yo 2001/04/01 16:09:18 @@ -486,7 +486,7 @@ One should be careful not to use too complicated code with this option, at least for the styles that are looked up quite often. These are basically those that define some global completion behaviour but -allow that to be different for all matches or groups as matches (such +allow that to be different for all matches or groups of matches (such as the tt(menu) and tt(list-rows-first) styles). Alternatively one can always use a less general pattern for the context than in the example above and use a second call to tt(zstyle) with a generic @@ -760,7 +760,7 @@ ) kindex(prefixes, completion tag) item(tt(prefixes))( -for prefixes (like those of an URL) +for prefixes (like those of a URL) ) kindex(printers, completion tag) item(tt(printers))( @@ -942,8 +942,8 @@ kindex(cache-path, completion style) item(tt(cache-path))( This style defines the path where any cache files containing dumped -completion data are stored. Defaults to `tt($DOTDIR/.zcompcache)', or -`tt($HOME/.zcompcache)' if tt($DOTDIR) is not defined. The completion +completion data are stored. Defaults to `tt($ZDOTDIR/.zcompcache)', or +`tt($HOME/.zcompcache)' if tt($ZDOTDIR) is not defined. The completion layer will not be used unless the tt(use-cache) style is set. ) kindex(call-command, completion style) @@ -980,8 +980,8 @@ Note that the completion function generally has to call the command everytime it is called. Because of that care should be taken to -specify only commands that take only a short time to run (and that -will eventually stop at all). +specify only commands that take a short time to run (and that will +eventually stop at all). ) kindex(commands, completion style) item(tt(commands))( @@ -1086,6 +1086,8 @@ This can be useful on systems that support special filesystems whose top-level pathnames can not be listed or generated with glob patterns. +It can also be used for directories for which one does not have read +permission. ) kindex(fake-parameters, completion style) item(tt(fake-parameters))( @@ -1197,24 +1199,24 @@ specify output attributes, such as `tt(%B)', `tt(%S)' and `tt(%{)...tt(%})'. -For the same purpose, this style is also tested with the tags used -when matches are generated before it is tested for the -tt(descriptions) tag. This gives the possibility to define different -format strings for different types of matches. +For the same purpose, this style is also tested with the tags used when +matches are generated before it is tested for the tt(descriptions) +tag. This provides the possibility of defining different format +strings for different types of matches. Note also that some completer functions define additional `tt(%)'-sequences. These are described for the completer functions that make use of them. -For the tt(messages) tag, this defines a string used by some +For the tt(messages) tag, this style defines a string used by some completion functions to display messages. Here, the `tt(%d)' is -replaced with the message given by the completion function. +replaced with a message given by the completion function. -Finally, when set with the tt(warnings) tag, the format string is printed -when no matches could be generated at all. In this case the `tt(%d)' is -replaced with the descriptions for the matches that were expected -separated by spaces and the sequence `tt(%D)' is replaced with those -descriptions separated by newlines. +Finally, when set with the tt(warnings) tag, the format string is +printed when no matches could be generated at all. In this case the +`tt(%d)' is replaced with the descriptions for the matches that were +expected separated by spaces and the sequence `tt(%D)' is replaced with +those descriptions separated by newlines. The `tt(%)' for the sequences that are replaced by strings provided by the completion functions like the `tt(%d)' may be followed by field @@ -2308,13 +2310,14 @@ Hence on the first try the completer field of the context contains `tt(approximate-1)', on the second try `tt(approximate-2)', and so on. -When tt(_approximate) is called from another function, the number of errors -to accept may be given with the tt(-a) option. Its argument should be -the same as the value of the tt(max-errors) style, all in one string. +When tt(_approximate) is called from another function, the number of +errors to accept may be given with the tt(-a) option. Its argument +should be the same as the value of the tt(max-errors) style, all in one +string. Note that this completer (and the tt(_correct) completer mentioned below) can be quite expensive to call, especially when a large number -of errors is allowed. One way to avoid this is to set up the +of errors are allowed. One way to avoid this is to set up the tt(completer) style using the tt(-e) option to zstyle so that some completers are only used when completion is attempted a second time on the same string, e.g.: Index: Doc/Zsh/compwid.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compwid.yo,v retrieving revision 1.29 diff -u -r1.29 compwid.yo --- Doc/Zsh/compwid.yo 2001/03/12 17:39:24 1.29 +++ Doc/Zsh/compwid.yo 2001/04/01 16:09:23 @@ -250,7 +250,7 @@ ) vindex(last_prompt, compstate) item(tt(last_prompt))( -If this is set to an non-empty string for every match added, the +If this is set to a non-empty string for every match added, the completion code will move the cursor back to the previous prompt after the list of completions has been displayed. Initially this is set or unset according to the tt(ALWAYS_LAST_PROMPT) option. @@ -416,7 +416,7 @@ item(tt(vared))( If completion is called while editing a line using the tt(vared) builtin, the value of this key is set to the name of the parameter -given as argument to tt(vared). This key is only set while a tt(vared) +given as an argument to tt(vared). This key is only set while a tt(vared) command is active. ) enditem() @@ -821,7 +821,7 @@ the tt(GLOB_COMPLETE) option is set or the tt(pattern_match) of the tt(compstate) special association is set to a non-empty string. -The var(match-spec) given as argument to the tt(-M) option (see +The var(match-spec) given as the argument to the tt(-M) option (see ifzman(`Builtin Commands' above)\ ifnzman(noderef(Builtin Commands))\ ) consists of one or more matching descriptions separated by Index: Doc/Zsh/expn.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/expn.yo,v retrieving revision 1.26 diff -u -r1.26 expn.yo --- Doc/Zsh/expn.yo 2001/03/12 17:39:24 1.26 +++ Doc/Zsh/expn.yo 2001/04/01 16:09:31 @@ -1122,6 +1122,7 @@ can be specified by separating two characters by a `tt(-)'. A `tt(-)' or `tt(])' may be matched by including it as the first character in the list. +cindex(character classes) There are also several named classes of characters, in the form `tt([:)var(name)tt(:])' with the following meanings: `tt([:alnum:])' alphanumeric, `tt([:alpha:])' alphabetic,