zsh-workers
 help / color / mirror / code / Atom feed
* Re: Completion strangeness
       [not found] <428A59D9.9050305@krose.org>
@ 2005-05-19 11:29 ` Oliver Kiddle
  2005-05-20  8:29   ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2005-05-19 11:29 UTC (permalink / raw)
  To: zsh-workers; +Cc: Kyle Rose

Kyle Rose wrote:
> This relates to zsh 4.2.5's ssh command line completion.  I don't know
> if this problem exists in earlier versions.

This is unrelated to the bug Bart pointed to. I can't reproduce what you
show exactly but I have isolated this down to what is undoubtably a bug.
Whether this is the problem you're having, I'm not sure.

>   krose@jihl ~% ssh krose@yupa..org
> 
> with the cursor over the second ".".

I always found that sort of stuff (filling in characters to the right of
the cursor) a bit weird. I've seen it before and assumed Sven meant it
as a feature. Maybe he didn't.

We can cut this down to a minimal setup to see problems:

zsh -f
autoload -U compinit; compinit
zstyle ':completion:*:::' _complete
_try() {       
compset -P '*@'
compadd -M 'r:|.=* r:|=*' \
        yupa-dmz.valley-of-wind.krose.org \
        yupa.krose.org yupa.valley-of-wind.krose.org
}
compdef _try t

Now compare the following:
% t y<tab>
  -> t yupa_
% t kr@y<tab>
  -> t kr@yupa_
% t kro@y<tab>
  -> t kro@yupa._.

Where _ is the cursor.

Patterns like '???' and '????' in compset also work. If compset has
removed four or more characters, we get the separator character (.)
inserted. So the problem is in the C code.

Oliver


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Completion strangeness
  2005-05-19 11:29 ` Completion strangeness Oliver Kiddle
@ 2005-05-20  8:29   ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2005-05-20  8:29 UTC (permalink / raw)
  To: zsh-workers

On May 19,  1:29pm, Oliver Kiddle wrote:
} Subject: Re: Completion strangeness
}
} This is unrelated to the bug Bart pointed to.

I was about to say, "then I was mistaken."

} We can cut this down to a minimal setup to see problems:

[snip]

} Patterns like '???' and '????' in compset also work. If compset has
} removed four or more characters, we get the separator character (.)
} inserted. So the problem is in the C code.

I fiddled with this just a little.  It's not always "four or more" --
it's somehow related to the length of the (un?)ambiguous prefix in the
part compset leaves behind.  For example, if you change
	yupa-dmz.valley-of-wind.krose.org
to
	yuppa-dmz.valley-of-wind.krose.org
in your minimal example (extra 'p'), then the problem appears only
after compset has removed five or more characters.  If you change the
set of completions to
	yupa-dmz.valley-of-wind.krose.org \ 
	yipa.krose.org yopa.valley-of-wind.krose.org
then the problem appears only after seven or more characters are
removed.  And you can see it with

% t 123456@y

so it's not related to "kro" forming a substring of the right side.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-20  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <428A59D9.9050305@krose.org>
2005-05-19 11:29 ` Completion strangeness Oliver Kiddle
2005-05-20  8:29   ` Bart Schaefer

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).