From: "Andrej Borsenkow" <borsenkow.msk@sni.de>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: something strange with compset and/or _normal
Date: Thu, 10 Jun 1999 18:49:26 +0400 [thread overview]
Message-ID: <002401beb350$6f6ccef0$21c9ca95@mow.siemens.ru> (raw)
I try to complete after sudo; the relevant part (albeit clumsy) is
if [[ $cmd -gt 0 ]] && compset -n $cmd
then
_normal
where ``cmd'' is position of command to execute and is computed somewhere
else.
Unfortunately, that is what I get in log:
+ local comp
+ setopt localoptions nullglob rcexpandparam
+ unsetopt markdirs globsubst shwordsplit nounset ksharrays
+ compset -P 1 \=
+ [[ /t != */* ]]
+ (( 0 ))
+ set _complete _match
+ _complete
+ local comp name
+ [[ -n ]]
+ comp=_first
+ [[ ! -z _first ]]
+ _first
+ (( 0 ))
+ [[ command == command ]]
+ _normal
+ local comp command cmd1 cmd2 pat val name i ret=1
+ command=sudo
+ [[ CURRENT -eq 1 ]]
+ [[ s == = ]]
+ [[ sudo == */* ]]
+ cmd1=sudo
+ cmd2=+ whence -p sudo
+ cmd2=/tools/bin/sudo
+ pat=zf*
+ val=_zftp
+ [[ sudo == zf* || /tools/bin/sudo == zf* ]]
+ name=sudo
+ comp=_sudo
+ [[ -z _sudo ]]
+ [[ -z _sudo ]]
+ [[ -z _sudo ]]
+ _sudo
+ emulate -L zsh
+ local -i i=1 cmd=0
+ [[ 1 -lt 3 ]]
+ [[ 2 -gt 2 ]]
+ cmd=2
+ break
+ [[ 2 -gt 0 ]]
+ compset -n 2
+ _normal
+ local comp command cmd1 cmd2 pat val name i ret=1
+ command=umount
+ [[ CURRENT -eq 1 ]]
+ [[ u == = ]]
+ [[ umount == */* ]]
+ cmd1=umount
+ cmd2=+ whence -p umount
+ cmd2=/usr/sbin/umount
+ pat=zf*
+ val=_zftp
+ [[ umount == zf* || /usr/sbin/umount == zf* ]]
+ name=umount
+ comp=_umount
+ [[ -z _umount ]]
+ [[ -z _umount ]]
+ [[ -z _umount ]]
+ _sudo
Oops! Why is _sudo called instead of _umount?
/andrej
next reply other threads:[~1999-06-10 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-10 14:49 Andrej Borsenkow [this message]
1999-06-10 15:20 Sven Wischnowsky
1999-06-10 15:04 ` Peter Stephenson
1999-06-11 6:57 Sven Wischnowsky
1999-06-11 11:09 ` Bart Schaefer
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='002401beb350$6f6ccef0$21c9ca95@mow.siemens.ru' \
--to=borsenkow.msk@sni.de \
--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).