From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: Problem with _arguments and _normal as action if nolistambiguous is set.
Date: Fri, 10 Sep 1999 20:19:48 +0400 [thread overview]
Message-ID: <001001befba8$4d7eb6a0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <000b01befb8f$9f2f87e0$21c9ca95@mow.siemens.ru>
With the sudo completion as below, I get very funny results. It does not happen
if I use _files as action instead of _normal. The arguments itself are completed
correctly (that is, command name and parameters), but sudo -TAB is at least
strange.
Again, it is 3.1.6-pws-3 with patches up to 7750
bor@itsrm2:~/.zsh.d/completion%> zsh -f
itsrm2% autoload compinit
itsrm2% fpath=($fpath ~/.zsh.d/completion)
itsrm2% compinit -D
itsrm2% setopt nolistambiguous
itsrm2% compconf describe_options=yes
itsrm2% sudo -TAB
itsrm2% sudo <=cursor here
-
-H -- set HOME environment variable
-V -- show version
-b -- run command in background
-h -- show help
-k -- remove timestamp file
-l -- list commands
-s -- run SHELL
-v -- validate timestamp file
-p -r -u
TAB once more
itsrm2% sudo !<=cursor
-
-H -- set HOME environment variable
-V -- show version
-b -- run command in background
-h -- show help
-k -- remove timestamp file
-l -- list commands
-s -- run SHELL
-v -- validate timestamp file
-p -r -u
TAB once more
itsrm2% sudo !!<=cursor
-
-H -- set HOME environment variable
-V -- show version
-b -- run command in background
-h -- show help
-k -- remove timestamp file
-l -- list commands
-s -- run SHELL
-v -- validate timestamp file
-p -r -u
Here is half-hearted example of sudo completion:
>
> _arguments \
> '-V[show version]' \
> '-l[list commands]' \
> '-h[show help]' \
> '-v[validate timestamp file]' \
> '-k[remove timestamp file]' \
> '-b[run command in background]' \
> '-r:Kerberos realm:' \
> '-p:prompt:' \
> '-u:user name:_users' \
> '-s[run SHELL]' \
> '-H[set HOME environment variable]' \
> '*::complete command and/or arguments:_normal'
>
/andrej
next prev parent reply other threads:[~1999-09-10 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-10 13:23 Problem with _arguments and invalid options Andrej Borsenkow
1999-09-10 16:19 ` Andrej Borsenkow [this message]
1999-09-13 13:30 Problem with _arguments and _normal as action if nolistambiguous is set Sven Wischnowsky
1999-09-14 9:50 Sven Wischnowsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001001befba8$4d7eb6a0$21c9ca95@mow.siemens.ru' \
--to=andrej.borsenkow@mow.siemens.ru \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).