* Overeager completion?
@ 2002-11-23 0:25 Danek Duvall
2002-11-25 10:59 ` Oliver Kiddle
0 siblings, 1 reply; 4+ messages in thread
From: Danek Duvall @ 2002-11-23 0:25 UTC (permalink / raw)
To: Zsh Workers
With zsh-4.0.6 on Linux (seen also with 4.0.3, as well as 4.0.5 on
Solaris):
% zsh -f
% mkdir /tmp/foo
% cd /tmp/foo
% mkdir a b
% touch a/{1,2,3,4}
% cd /tmp/foo/b
% ls ../^D
a/ b/
% ls ..//^D
a/ b/
Ok, fine.
Now
% autoload -U compinit
% compinit
% ls ../^D
a/ b/
% ls ..//^D
1 2 3 4
Oops. Then, for good measure, hit ^C twice to quit the shell. :)
Danek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Overeager completion?
2002-11-23 0:25 Overeager completion? Danek Duvall
@ 2002-11-25 10:59 ` Oliver Kiddle
2002-11-26 17:08 ` Danek Duvall
2002-11-27 7:11 ` Sven Wischnowsky
0 siblings, 2 replies; 4+ messages in thread
From: Oliver Kiddle @ 2002-11-25 10:59 UTC (permalink / raw)
To: Danek Duvall; +Cc: Zsh Workers
On 22 Nov, Danek Duvall wrote:
> % zsh -f
> % mkdir /tmp/foo
> % cd /tmp/foo
> % mkdir a b
> % touch a/{1,2,3,4}
> % autoload -U compinit
> % compinit
> % ls ../^D
> a/ b/
> % ls ..//^D
> 1 2 3 4
That's a feature. See the documentation for the squeeze-slashes style in
the manual:
If set to `true', sequences of slashes (as in `foo//bar') will
be treated as if they were only one slash when completing path-
names. This is the usual behaviour of UNIX paths. However, by
default the file completion function behaves as if there were a
`*' between the slashes.
So if you don't like it, set squeeze-slashes to true.
> Oops. Then, for good measure, hit ^C twice to quit the shell. :)
That could be a bug. Seems to occur after any ^D used to list choices.
Oliver
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Overeager completion?
2002-11-25 10:59 ` Oliver Kiddle
@ 2002-11-26 17:08 ` Danek Duvall
2002-11-27 7:11 ` Sven Wischnowsky
1 sibling, 0 replies; 4+ messages in thread
From: Danek Duvall @ 2002-11-26 17:08 UTC (permalink / raw)
To: Zsh Workers
On Mon, Nov 25, 2002 at 10:59:25AM +0000, Oliver Kiddle wrote:
> If set to `true', sequences of slashes (as in `foo//bar') will
> be treated as if they were only one slash when completing path-
> names. This is the usual behaviour of UNIX paths. However, by
> default the file completion function behaves as if there were a
> `*' between the slashes.
Hm. All right. I suppose if I'd gone a step further and started
hitting tab to complete to one of them, I would have noticed that the
"a/" would have been inserted. But the list "1 2 3 4" at "..//" just
looked wrong. Maybe "a/1 a/2 a/3 a/4" instead?
Anyhow, thanks; I've now set squeeze-slashes.
> > Oops. Then, for good measure, hit ^C twice to quit the shell. :)
>
> That could be a bug. Seems to occur after any ^D used to list choices.
Yeah, I've been seeing this for some time -- since 3.1.x at least, I'm
pretty sure, but I don't have a copy around to check -- but have always
blown past it too fast to have noticed what exactly it was that
triggered it.
Danek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Overeager completion?
2002-11-25 10:59 ` Oliver Kiddle
2002-11-26 17:08 ` Danek Duvall
@ 2002-11-27 7:11 ` Sven Wischnowsky
1 sibling, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2002-11-27 7:11 UTC (permalink / raw)
To: zsh-workers
Hi!
Oliver Kiddle wrote:
> ...
>
> > Oops. Then, for good measure, hit ^C twice to quit the shell. :)
>
> That could be a bug. Seems to occur after any ^D used to list choices.
Indeed. I think I've tracked it down, but no patch yet. The problem is
that getkey() returns EOF and in zle_keymap.c:1289 `c' (the variable
holding the code of the character typed last) is reset to `lastc'
which, at that time, contains the ^D. So the first ^C erases the line
and the second one (where `c' ist again set to the ^D from `lastc')
makes the test in zle_main.c:655 be true -- and exit the shell.
Maybe we should zero out that `lastc' when we get a ^C around line
zle_main.c:600. But I'm not sure whether we should turn `lastc' into a
global variable or make getkey() return a special value for that...
Bye
Sven
--
Sven Wischnowsky wischnow@berkom.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-27 7:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-23 0:25 Overeager completion? Danek Duvall
2002-11-25 10:59 ` Oliver Kiddle
2002-11-26 17:08 ` Danek Duvall
2002-11-27 7:11 ` Sven Wischnowsky
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).