Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _arguments -C cleanup (was: Re: PATCH: _look)
- X-seq: zsh-workers 11195
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: _arguments -C cleanup (was: Re: PATCH: _look)
- Date: Fri, 5 May 2000 15:37:03 +0200 (MET DST)
- In-reply-to: Sven Wischnowsky's message of Fri, 5 May 2000 13:55:57 +0200 (MET DST)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I wrote:
> In other words, there is a `-C' missing in _gzip (and probably in
> other functions?).
Here is the patch to hopefully make this consistent everywhere.
Akira, in _look there was a compadd without a _wanted/description or
anything. I've made it use the `value' tag with a `values'
description, is there anything more precise we could use or is that ok?
Bye
Sven
Index: Completion/AIX/_lsdev
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/AIX/_lsdev,v
retrieving revision 1.1
diff -u -r1.1 _lsdev
--- Completion/AIX/_lsdev 2000/04/20 10:47:01 1.1
+++ Completion/AIX/_lsdev 2000/05/05 13:33:52
@@ -14,7 +14,7 @@
'-r[display set of values in a column]:columnname:->columnname' \
'(-P)-S[specify a device state]:device state:(Available Defined Stopped)' \
'-s[specify a device subclass]:device subclass:->subclass' \
- '-t[specify a device type name]:device type name:->devtype'
+ '-t[specify a device type name]:device type name:->devtype' && return 0
case $state in
class)
Index: Completion/Builtins/_bindkey
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_bindkey,v
retrieving revision 1.3
diff -u -r1.3 _bindkey
--- Completion/Builtins/_bindkey 2000/04/25 09:48:09 1.3
+++ Completion/Builtins/_bindkey 2000/05/05 13:33:52
@@ -7,7 +7,8 @@
#
# Where appropriate, will complete keymaps instead of widgets.
-local state expl line
+local state expl line curcontext="$curcontext"
+typeset -A opt_args
_arguments -C -s \
'(-v -a -M -l -D -A -N)-e[select emacs keymap and bind it to main]' \
Index: Completion/Builtins/_compdef
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_compdef,v
retrieving revision 1.4
diff -u -r1.4 _compdef
--- Completion/Builtins/_compdef 2000/04/25 09:48:09 1.4
+++ Completion/Builtins/_compdef 2000/05/05 13:33:53
@@ -1,6 +1,7 @@
#compdef compdef
-local state line expl list disp
+local state line expl list disp curcontext="$curcontext"
+typeset -A opt_args
_arguments -C -s \
'(-d)-a[make function autoloadable]' \
Index: Completion/Builtins/_zcompile
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zcompile,v
retrieving revision 1.3
diff -u -r1.3 _zcompile
--- Completion/Builtins/_zcompile 2000/05/03 12:26:20 1.3
+++ Completion/Builtins/_zcompile 2000/05/05 13:33:53
@@ -1,9 +1,9 @@
#compdef zcompile
-local context state line expl
+local state line expl curcontext="$curcontext"
typeset -A opt_args
-_arguments -s \
+_arguments -C -s \
'(-t -c -m -a)-U[don'\''t expand aliases]' \
'(-t -M)-R[mark as read]' \
'(-t -R)-M[mark as mapped]' \
Index: Completion/Builtins/_zpty
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zpty,v
retrieving revision 1.4
diff -u -r1.4 _zpty
--- Completion/Builtins/_zpty 2000/04/25 09:48:09 1.4
+++ Completion/Builtins/_zpty 2000/05/05 13:33:53
@@ -1,6 +1,7 @@
#compdef zpty
-local state line list names expl
+local state line list names expl curcontext="$curcontext"
+typeset -A opt_args
_arguments -C -s \
'(-d -w -r -L)-e[echo input characters]' \
Index: Completion/Builtins/_zstyle
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zstyle,v
retrieving revision 1.8
diff -u -r1.8 _zstyle
--- Completion/Builtins/_zstyle 2000/05/04 07:44:21 1.8
+++ Completion/Builtins/_zstyle 2000/05/05 13:33:53
@@ -92,7 +92,7 @@
sequences sessions signals strings tags targets types urls users values
warnings widgets windows zsh-options)
-_arguments ':context:->contexts' ':style:->styles' '*:argument:->style-arg'
+_arguments -C ':context:->contexts' ':style:->styles' '*:argument:->style-arg'
while [[ -n $state ]]; do
ostate=$state
Index: Completion/User/_archie
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_archie,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 _archie
--- Completion/User/_archie 2000/03/23 04:19:29 1.1.1.6
+++ Completion/User/_archie 2000/05/05 13:33:53
@@ -20,12 +20,14 @@
'-h+[specifies server host]:server host:->serverhost' \
'-L[list known servers and current default]' \
'-N-[specifies query niceness level (0-35765)]:niceness level:' \
- ':string:'
+ ':string:' && return 0
case "$state" in
serverhost)
: ${(A)archie_servers:=${(M)$(_call hosts archie -L):#archie.*}}
- _wanted hosts expl 'archie servers' compadd - $archie_servers
+ _wanted hosts expl 'archie servers' compadd - $archie_servers && return 0
;;
esac
+
+return 1
Index: Completion/User/_bzip2
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_bzip2,v
retrieving revision 1.3
diff -u -r1.3 _bzip2
--- Completion/User/_bzip2 2000/05/05 10:08:26 1.3
+++ Completion/User/_bzip2 2000/05/05 13:33:53
@@ -1,6 +1,6 @@
#compdef bzip2 bzcat bunzip2 bzip2recover
-local decompress expl state line
+local decompress expl state line curcontext="$curcontext"
typeset -A opt_args
case "${words[1]:t}" in
@@ -39,7 +39,7 @@
'(-1 -2 -3 -4 -5 -6 -8 -9)-7' \
'(-1 -2 -3 -4 -5 -6 -7 -9)-8' \
'(-1 -2 -3 -4 -5 -6 -7 -8 )-9' \
- '*:files:->files'
+ '*:files:->files' && return 0
;;
esac
@@ -49,9 +49,11 @@
$+opt_args[--test] )) && unset decompress
if [[ -z "$decompress" ]] ; then
_description files expl 'compressed file'
- _files "$expl[@]" -g '*.bz2'
+ _files "$expl[@]" -g '*.bz2' && return 0
else
_description files expl 'file to compress'
- _files "$expl[@]" -g '*~*.bz2'
+ _files "$expl[@]" -g '*~*.bz2' && return 0
fi
fi
+
+return 1
Index: Completion/User/_compress
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_compress,v
retrieving revision 1.2
diff -u -r1.2 _compress
--- Completion/User/_compress 2000/05/05 10:08:26 1.2
+++ Completion/User/_compress 2000/05/05 13:33:53
@@ -1,6 +1,7 @@
#compdef compress uncompress
local expl state line bits common_args1 common_args2 decompress
+local curcontext="$curcontext"
typeset -A opt_args
bits=( {9..16} )
@@ -18,18 +19,18 @@
case "${words[1]:t}" in
compress)
- _arguments -s \
+ _arguments -C -s \
"-b[specify maximum number of bits used to replace common substring]:bits:(${bits[*]})" \
'-C[produce output compatible with BSD 2.0]' \
'(-b -C)-d[decompress]' \
- "${common_args2[@]}"
+ "${common_args2[@]}" && return 0
;;
uncompress)
- _arguments -s "${common_args2[@]}"
+ _arguments -C -s "${common_args2[@]}" && return 0
decompress=yes
;;
zcat)
- _arguments -s "${common_args1[@]}"
+ _arguments -C -s "${common_args1[@]}" && return 0
decompress=yes
;;
esac
@@ -37,9 +38,11 @@
if [[ "$state" = files ]]; then
if [[ -z "$decompress" ]] || (( $+opt_args[-d] )); then
_description files expl 'file to compress'
- _files "$expl[@]" -g '*~*.Z'
+ _files "$expl[@]" -g '*~*.Z' && return 0
else
_description files expl 'compressed file'
- _files "$expl[@]" -g '*.Z'
+ _files "$expl[@]" -g '*.Z' && return 0
fi
fi
+
+return 1
Index: Completion/User/_enscript
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_enscript,v
retrieving revision 1.2
diff -u -r1.2 _enscript
--- Completion/User/_enscript 2000/04/28 11:20:55 1.2
+++ Completion/User/_enscript 2000/05/05 13:33:53
@@ -1,8 +1,9 @@
#compdef enscript
-local state context line opt_args
+local state context line curcontext="$curcontext"
+typeset -A opt_args
-_arguments -s \
+_arguments -C -s \
'( -2 --columns)-1' \
'(-1 --columns)-2' \
'(-1 -2 )--columns=:columns:' \
@@ -126,7 +127,7 @@
'--ul-gray=:underlay text'\''s gray level:(.8)' \
'--ul-position=:underlay text'\''s position:(+0+0 -0-0)' \
'--ul-style=:underlay text'\''s style:(outline filled)' \
- '*:filename:_files'
+ '*:filename:_files' && return 0
case "$state" in
commandline)
Index: Completion/User/_finger
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_finger,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 _finger
--- Completion/User/_finger 2000/02/28 10:00:28 1.1.1.2
+++ Completion/User/_finger 2000/05/05 13:33:53
@@ -69,7 +69,7 @@
fi
fi
-_arguments -C -s $_finger_args '*:finger targets:->finger-targets'
+_arguments -C -s $_finger_args '*:finger targets:->finger-targets' && return 0
case "$state" in
finger-targets)
Index: Completion/User/_gzip
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_gzip,v
retrieving revision 1.2
diff -u -r1.2 _gzip
--- Completion/User/_gzip 2000/04/26 08:34:14 1.2
+++ Completion/User/_gzip 2000/05/05 13:33:53
@@ -1,8 +1,6 @@
#compdef gzip gunzip gzcat
-local decompress
-local expl
-local curcontext="$curcontext" state line
+local decompress expl curcontext="$curcontext" state line
typeset -A opt_args
case "${words[1]:t}" in
@@ -10,7 +8,7 @@
decompress=yes
;&
gzip)
- _arguments -s \
+ _arguments -C -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]' \
@@ -53,7 +51,7 @@
'(--fast -1 -2 -3 -4 -5 -6 -7 -9 --best)-8' \
'(--fast -1 -2 -3 -4 -5 -6 -7 -8 --best)-9' \
'(--fast -1 -2 -3 -4 -5 -6 -7 -8 -9 )--best' \
- '*:files:->files'
+ '*:files:->files' && return 0
;;
esac
Index: Completion/User/_imagemagick
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_imagemagick,v
retrieving revision 1.2
diff -u -r1.2 _imagemagick
--- Completion/User/_imagemagick 2000/04/05 11:28:09 1.2
+++ Completion/User/_imagemagick 2000/05/05 13:33:53
@@ -1,6 +1,6 @@
#compdef display animate import montage convert combine mogrify xtp
-local context state line expl formats
+local state line expl formats curcontext="$curcontext"
typeset -A opt_args
# Things that could be improved:
@@ -187,7 +187,7 @@
;;
convert)
- _arguments -M 'm:{a-z}={A-Z}' \
+ _arguments -C -M 'm:{a-z}={A-Z}' \
'-adjoin[join images]' \
'-antialias[remove pixel aliasing]' \
'-append[append image sequence]' \
Index: Completion/User/_look
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_look,v
retrieving revision 1.1
diff -u -r1.1 _look
--- Completion/User/_look 2000/05/05 11:33:28 1.1
+++ Completion/User/_look 2000/05/05 13:33:53
@@ -1,18 +1,17 @@
#compdef look
-local context state line
+local curcontext="$curcontext" state line
typeset -A opt_args
-_arguments -s \
+_arguments -C -s \
'-t+[termination character]:termination character:' \
'-f[case insensitive]' \
'-d[dictionary order]' \
- ':string:->string'
+ ':string:->string' && return 0
case "$state" in
string)
- if [[ -n "$PREFIX" ]]; then
- compadd - $(_call values $words[1] $PREFIX)
- fi
+ [[ -n "$PREFIX" ]] &&
+ _wanted values expl value compadd - $(_call values $words[1] $PREFIX)
;;
esac
Index: Completion/User/_lynx
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_lynx,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 _lynx
--- Completion/User/_lynx 2000/02/27 16:37:37 1.1.1.6
+++ Completion/User/_lynx 2000/05/05 13:33:53
@@ -95,7 +95,7 @@
'-version' \
'-vikeys' \
'-width=:NUMBER:' \
- ':url:->html'
+ ':url:->html' && return 0
case "$state" in
restrictions)
Index: Completion/User/_lzop
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_lzop,v
retrieving revision 1.1
diff -u -r1.1 _lzop
--- Completion/User/_lzop 2000/05/05 10:08:26 1.1
+++ Completion/User/_lzop 2000/05/05 13:33:53
@@ -1,6 +1,6 @@
#compdef lzop
-local expl state line decompress disp
+local expl state line decompress disp curcontext="$curcontext"
typeset -A opt_args
_arguments -C -s \
@@ -74,7 +74,7 @@
'--color[assume a color ANSI terminal]' \
'--intro[display intro sequence]' \
'--filter=[preprocess data with a special multimedia filter]:number' \
- '*:files:->files'
+ '*:files:->files' && return 0
case "$state" in
files)
Index: Completion/User/_mutt
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_mutt,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 _mutt
--- Completion/User/_mutt 2000/03/23 04:19:30 1.1.1.11
+++ Completion/User/_mutt 2000/05/05 13:33:53
@@ -1,28 +1,29 @@
#compdef mutt
local curcontext="$curcontext" state line ret=1
+typeset -A opt_args
- _arguments -C \
- '::recipient:->userhost' \
- '-a:MIME attachment:_files' \
- '-b:BCC recipient:->userhost' \
- '-c:CC recipient:->userhost' \
- '-e:post-init configuration:' \
- '-f+:mailbox: _mailboxes' \
- '-F+:init file:_files' \
- '-h+:help:' \
- '-H+:draft file:_files' \
- '-i:include file:_files' \
- '-m+:default mailbox type:(mbox MMDF MH Maildir)' \
- '-n+:bypass system configuration:' \
- '-p+:resume postponed message:' \
- '-R+:open in read-only mode:' \
- '-s+:subject:' \
- '-v+:version:' \
- '-x+:emulate mailx compose:' \
- '-y+:start listing mailboxes:' \
- '-z+:start only if new messages:' \
- '-Z+:open first mailbox with new mail:' && ret=0
+_arguments -C \
+ '::recipient:->userhost' \
+ '-a:MIME attachment:_files' \
+ '-b:BCC recipient:->userhost' \
+ '-c:CC recipient:->userhost' \
+ '-e:post-init configuration:' \
+ '-f+:mailbox: _mailboxes' \
+ '-F+:init file:_files' \
+ '-h+:help:' \
+ '-H+:draft file:_files' \
+ '-i:include file:_files' \
+ '-m+:default mailbox type:(mbox MMDF MH Maildir)' \
+ '-n+:bypass system configuration:' \
+ '-p+:resume postponed message:' \
+ '-R+:open in read-only mode:' \
+ '-s+:subject:' \
+ '-v+:version:' \
+ '-x+:emulate mailx compose:' \
+ '-y+:start listing mailboxes:' \
+ '-z+:start only if new messages:' \
+ '-Z+:open first mailbox with new mail:' && ret=0
if [[ "$state" = userhost ]]; then
if compset -P '*@'; then
Index: Completion/User/_nedit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_nedit,v
retrieving revision 1.3
diff -u -r1.3 _nedit
--- Completion/User/_nedit 2000/05/01 18:14:08 1.3
+++ Completion/User/_nedit 2000/05/05 13:33:53
@@ -1,6 +1,7 @@
#compdef nedit nc
-local state line expl nedit_common
+local state line expl nedit_common curcontext="$curcontext"
+typeset -A opt_args ret=1
nedit_common=( \
'-read[open file read only]' \
@@ -18,7 +19,7 @@
'(-noask)-ask[prompt if no server found]' \
'(-ask)-noask[start a new server without asking if none found]' \
'-svrcmd[command to run server]:server command:_command_names -e' \
- "$nedit_common[@]"
+ "$nedit_common[@]" && ret=0
else
_x_arguments -C \
'-server[designate this session as an nedit server]' \
@@ -41,10 +42,12 @@
'(-fg)-foreground:foreground color:_x_color' \
'(-foreground)-fg[specify foreground color]:foreground color:_x_color' \
'*-import[load additional preferences file]:nedit preferences file:_files' \
- "$nedit_common[@]"
+ "$nedit_common[@]" && ret=0
fi
[[ $state = lang && -f ~/.nedit ]] &&
_wanted neditlanguages expl 'language mode' \
compadd - ${(f)"$(sed -n \
- '/^nedit.languageMode/,/^nedit/ s/.* \([^:]*\).*/\1/p' < ~/.nedit)"}
+ '/^nedit.languageMode/,/^nedit/ s/.* \([^:]*\).*/\1/p' < ~/.nedit)"} && ret=0
+
+return ret
Index: Completion/User/_nslookup
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_nslookup,v
retrieving revision 1.2
diff -u -r1.2 _nslookup
--- Completion/User/_nslookup 2000/04/11 07:57:57 1.2
+++ Completion/User/_nslookup 2000/05/05 13:33:53
@@ -19,7 +19,8 @@
# other characters than lower case letters, we try to call the function
# `_nslookup_host'.
-local context curstate="$curcontext" expl ret=1 setopts
+local state curcontext="$curcontext" expl ret=1 setopts
+typeset -A opt_args
setopts=(
'all[print current values]' \
Index: Completion/User/_socket
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_socket,v
retrieving revision 1.3
diff -u -r1.3 _socket
--- Completion/User/_socket 2000/05/02 08:23:31 1.3
+++ Completion/User/_socket 2000/05/05 13:33:53
@@ -5,7 +5,7 @@
# hosts-ports
# The style that contains pairs `host:port'.
-local curcontext="$curcontext" state line expl
+local curcontext="$curcontext" state line expl ret=1
typeset -A opt_args
[[ $CURRENT -eq 2 ]] &&
@@ -25,30 +25,32 @@
'-l[loop]' \
'-p[program]:command:->command' \
':arg1:->arg1' \
- ':arg2:->arg2'
+ ':arg2:->arg2' && ret=0
case "$state" in
command)
compset -q
if [[ $CURRENT -eq 1 ]]; then
- _command_names -e "$@"
+ _command_names -e "$@" && ret=0
else
- _normal
+ _normal && ret=0
fi
;;
arg1)
if (( $+opt_args[-s] )); then
- _ports
+ _ports && ret=0
else
- _wanted hosts expl 'host' _combination '' hosts-ports hosts -
+ _wanted hosts expl 'host' _combination '' hosts-ports hosts - && ret=0
fi
;;
arg2)
if (( ! $+opt_args[-s] )); then
_wanted ports expl 'port to connect' \
- _combination '' hosts-ports hosts="${line[1]:q}" ports -
+ _combination '' hosts-ports hosts="${line[1]:q}" ports - && ret=0
fi
;;
esac
+
+return ret
Index: Completion/User/_telnet
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_telnet,v
retrieving revision 1.1.1.16
diff -u -r1.1.1.16 _telnet
--- Completion/User/_telnet 2000/03/23 04:19:30 1.1.1.16
+++ Completion/User/_telnet 2000/05/05 13:33:53
@@ -42,7 +42,7 @@
_arguments -C -s \
"$_telnet_args[@]" \
':host:->hosts' \
- ':port:->ports'
+ ':port:->ports' && return 0
case "$state" in
hosts)
Index: Completion/User/_wget
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_wget,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 _wget
--- Completion/User/_wget 1999/11/15 12:01:50 1.1.1.5
+++ Completion/User/_wget 2000/05/05 13:33:53
@@ -68,7 +68,7 @@
'--cache=:cache:(on off)' \
'--htmlify=:htmlify:' \
'--no:no:->noflags' \
- '*:url:_urls'
+ '*:url:_urls' && return 0
# '--backups:backups:' \
# '-W' \
Index: Completion/User/_whois
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_whois,v
retrieving revision 1.2
diff -u -r1.2 _whois
--- Completion/User/_whois 2000/04/11 07:57:57 1.2
+++ Completion/User/_whois 2000/05/05 13:33:54
@@ -118,7 +118,7 @@
_arguments -C \
"$_whois_arguments[@]" \
- ':identifier:->identifier'
+ ':identifier:->identifier' && return 0
case "$state" in
identifier)
@@ -150,7 +150,7 @@
_arguments -C \
"$_whois_arguments[@]" \
- '*::identifier:->identifier'
+ '*::identifier:->identifier' && return 0
case "$state" in
identifier)
Index: Completion/X/_xauth
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/X/_xauth,v
retrieving revision 1.1
diff -u -r1.1 _xauth
--- Completion/X/_xauth 2000/05/03 11:38:32 1.1
+++ Completion/X/_xauth 2000/05/05 13:33:54
@@ -1,6 +1,6 @@
#compdef xauth
-local state context line expl
+local state context line expl ret=1
typeset -A opt_args
local tmp cmd
@@ -10,7 +10,7 @@
'(-v)-q[quiet mode]' \
'-b[break locks]' \
'-i[ignore locks]' \
- '*::command:->command'
+ '*::command:->command' && ret=0
while [[ -n "$state" ]]; do
tmp="$state"
@@ -27,7 +27,7 @@
_arguments \
':display name:->displayname' \
':protocol name:->protocolname' \
- ':hexkey:'
+ ':hexkey:' && ret=0
;;
generate)
@@ -42,7 +42,7 @@
data) _message 'hexdata';;
*)
_wanted options expl 'xauth generate options' \
- compadd trusted untrusted timeout group data
+ compadd trusted untrusted timeout group data && ret=0
;;
esac
fi
@@ -50,7 +50,7 @@
extract|nextract)
case "$CURRENT" in
- 2) _wanted files expl 'filename to write auth data' _files;;
+ 2) _wanted files expl 'filename to write auth data' _files && ret=0;;
*) state=displayname;;
esac
;;
@@ -60,7 +60,7 @@
;;
merge|nmerge)
- _wanted files expl 'filename to read auth data' _files
+ _wanted files expl 'filename to read auth data' _files && ret=0
;;
remove)
@@ -68,7 +68,7 @@
;;
source)
- _wanted files expl 'filename to source' _files
+ _wanted files expl 'filename to source' _files && ret=0
;;
info|exit|quit|\?)
@@ -99,17 +99,19 @@
'help:print help'
'?:list available commands'
)
- _describe 'xauth command' tmp --
+ _describe 'xauth command' tmp -- && ret=0
;;
protocolname)
_wanted values expl 'authorization protocol' \
- compadd MIT-MAGIC-COOKIE-1 XDM-AUTHORIZATION-1 SUN-DES-1 MIT-KERBEROS-5
+ compadd MIT-MAGIC-COOKIE-1 XDM-AUTHORIZATION-1 SUN-DES-1 MIT-KERBEROS-5 && ret=0
;;
displayname)
- _wanted values expl 'display name' \
- compadd - ${${(f)"$(xauth list)"}%% *} || _x_display
+ { _wanted values expl 'display name' \
+ compadd - ${${(f)"$(xauth list)"}%% *} || _x_display } && ret=0
;;
esac
done
+
+return ret
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author