From: "Oliver Kiddle" <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: ssh completion problem
Date: Wed, 6 Feb 2002 09:00:19 +0000 (GMT) [thread overview]
Message-ID: <20020206090019.81014.qmail@web9301.mail.yahoo.com> (raw)
In-Reply-To: <1020205170847.ZM29675@candle.brasslantern.com>
[ moved to -workers ]
Bart wrote:
> when I complete after `lll@' I get offered all possible hosts from
the
> `hosts' style. I want to be offered only `bbb.com' in that case.
>
> (When I complete after just `l', it completes to `lll', then waits
for
> another tab.)
>
> The problem is somehow related to this additional style:
>
> tag-order my-accounts \
> 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *'
I think the problem is due to this line in _combination:
compadd "$@" -a tmp || { (( $+functions[_$key] )) && "_$key" "$@" }
The line gets run for each of host hosts, domains and IP addresses.
Only one needs to fail for "_$key" (_hosts in effect) to go on to run.
This is quite possible as "$@" expands to, amoung other things, `-F
_comp_ignore'. I think the patch below is the right fix - provided tmp
can't be different with each of the tags.
We do compadd <something> || compadd <something else> in other parts of
the completion system so they may also be afflicted. As I think I've
mentioned previously, a way of specifying a default tag-order would be
better.
Oliver
--- Completion/Base/Utility/_combination Mon Apr 2 12:10:08 2001
+++ Completion/Base/Utility/_combination Wed Feb 6 03:21:32 2002
@@ -88,7 +88,11 @@
fi
tmp=( ${tmp%%${~sep}*} )
- compadd "$@" -a tmp || { (( $+functions[_$key] )) && "_$key" "$@" }
+ if (( $#tmp )); then
+ compadd "$@" -a tmp
+ elif (( $+functions[_$key] )); then
+ "_$key" "$@"
+ fi
else
(( $+functions[_$key] )) && "_$key" "$@"
fi
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
next parent reply other threads:[~2002-02-06 9:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1020205170847.ZM29675@candle.brasslantern.com>
2002-02-06 9:00 ` Oliver Kiddle [this message]
2002-02-07 1:54 ` Bart Schaefer
2002-02-08 9:40 ` Oliver Kiddle
2002-02-08 18:26 ` Bart Schaefer
2002-02-11 9:12 ` Sven Wischnowsky
2002-02-11 18:04 ` Bart Schaefer
2002-02-12 9:18 ` Oliver Kiddle
2002-02-12 13:16 ` Sven Wischnowsky
2002-02-12 15:08 ` Oliver Kiddle
2002-02-12 15:20 ` Sven Wischnowsky
2002-02-15 17:15 ` Oliver Kiddle
2002-02-18 14:28 ` 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=20020206090019.81014.qmail@web9301.mail.yahoo.com \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@sunsite.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).