* Re: completion bug?
@ 1999-08-25 14:58 Sven Wischnowsky
1999-08-25 16:07 ` Gabor
0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 1999-08-25 14:58 UTC (permalink / raw)
To: zsh-users
Gabor wrote:
> I have found an interesting completion bug in 3.1.6 which did not
> exist in 3.1.5. Here is the gist of it.
> $ some_command $(<.s
> at this point I hit tab and I have a directory called .ssh. Instead of
> completing it, it adds another '.' and then beeps at me. If I complete
> the directory name itself, then type tab for the contents, it then
> reinserts the directory name again.
> $ some_command $(<.ssh/
> now it inserts .ssh again after the forward slash. If I type in the
> the first character of the name I want completed it works fine. It's
> a totally weird bug. You have to try it yourself to understand it. I
> tried it in 3.1.5 and it didn't do this.
Whoa. We had some trouble with the changed command line parsing for
completion, but this once worked.
This should fix it.
Bye
Sven
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Wed Aug 25 14:58:19 1999
+++ Src/Zle/zle_tricky.c Wed Aug 25 16:57:32 1999
@@ -1422,7 +1422,7 @@
if (parend >= 0 && !tmp)
line = (unsigned char *) dupstring(tmp = (char *)line);
linptr = (char *) line + ll + addedx - parbegin + 1;
- if ((linptr - (char *) line) < 2 ||
+ if ((linptr - (char *) line) < 3 || *linptr != '(' ||
linptr[-1] != '(' || linptr[-2] != '$') {
if (parend >= 0) {
ll -= parend;
@@ -1482,6 +1482,7 @@
tmp = NULL;
linptr = (char *)line;
lexrestore();
+ addedx = 0;
goto start;
}
noaliases = 0;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: completion bug?
1999-08-25 14:58 completion bug? Sven Wischnowsky
@ 1999-08-25 16:07 ` Gabor
0 siblings, 0 replies; 5+ messages in thread
From: Gabor @ 1999-08-25 16:07 UTC (permalink / raw)
To: Sven Wischnowsky, zsh-users
Patch works great! Thanks.
On Wed, Aug 25, 1999 at 04:58:55PM +0200, Sven Wischnowsky wrote:
#
# Gabor wrote:
#
# > I have found an interesting completion bug in 3.1.6 which did not
# > exist in 3.1.5. Here is the gist of it.
# > $ some_command $(<.s
# > at this point I hit tab and I have a directory called .ssh. Instead of
# > completing it, it adds another '.' and then beeps at me. If I complete
# > the directory name itself, then type tab for the contents, it then
# > reinserts the directory name again.
# > $ some_command $(<.ssh/
# > now it inserts .ssh again after the forward slash. If I type in the
# > the first character of the name I want completed it works fine. It's
# > a totally weird bug. You have to try it yourself to understand it. I
# > tried it in 3.1.5 and it didn't do this.
#
# Whoa. We had some trouble with the changed command line parsing for
# completion, but this once worked.
#
# This should fix it.
#
# Bye
# Sven
#
# diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
# --- os/Zle/zle_tricky.c Wed Aug 25 14:58:19 1999
# +++ Src/Zle/zle_tricky.c Wed Aug 25 16:57:32 1999
# @@ -1422,7 +1422,7 @@
# if (parend >= 0 && !tmp)
# line = (unsigned char *) dupstring(tmp = (char *)line);
# linptr = (char *) line + ll + addedx - parbegin + 1;
# - if ((linptr - (char *) line) < 2 ||
# + if ((linptr - (char *) line) < 3 || *linptr != '(' ||
# linptr[-1] != '(' || linptr[-2] != '$') {
# if (parend >= 0) {
# ll -= parend;
# @@ -1482,6 +1482,7 @@
# tmp = NULL;
# linptr = (char *)line;
# lexrestore();
# + addedx = 0;
# goto start;
# }
# noaliases = 0;
#
# --
# Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: completion bug?
@ 2000-08-02 13:15 Sven Wischnowsky
0 siblings, 0 replies; 5+ messages in thread
From: Sven Wischnowsky @ 2000-08-02 13:15 UTC (permalink / raw)
To: zsh-users
Andy Spiegl wrote:
> I think, I just found a bug:
>
> hamster:/var/tmp>ls -la
> total 1036404
> drwxrwxrwt 2 root root 14336 Aug 2 11:13 ./
> drwxr-xr-x 21 root root 1024 Feb 19 00:07 ../
> -rwxrw-r-- 1 spiegl users 1112656 Aug 2 11:07 jarre2.sfk*
> -rwxrw---- 1 spiegl users 284823596 Aug 2 11:07 jarre2.wav*
> -rwxrw-r-- 1 spiegl users 3000720 Aug 2 11:08 jean.michel.jarre.free.concert.in.paris.1990-Paris.La.Defense.(A.City.in.Concert).sfk*
> -rwxrw---- 1 spiegl users 768167980 Aug 2 11:08 jean.michel.jarre.free.concert.in.paris.1990-Paris.La.Defense.(A.City.in.Concert).wav*
> hamster:/var/tmp>play jean<TAB>
>
> After that zsh hangs and the cpu load rises and rises.
> I had to send it a kill -9 to get rid of it.
>
> I suppose that "feature" is not intended? :-)
And of course we can't know what's happening without more
information. Namely: do you have a special completion for `play'? I
guess not. But I guess you have a match spec. So we need either your
style settings (`zstyle -L') or a xtrace output, e.g. try typing C-x?
after `ls jean'. This will produce a file with the xtrace in the
$TMPDIR (normally /tmp).
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* completion bug?
@ 2000-08-02 10:49 Andy Spiegl
0 siblings, 0 replies; 5+ messages in thread
From: Andy Spiegl @ 2000-08-02 10:49 UTC (permalink / raw)
To: ZSH User List
I think, I just found a bug:
hamster:/var/tmp>ls -la
total 1036404
drwxrwxrwt 2 root root 14336 Aug 2 11:13 ./
drwxr-xr-x 21 root root 1024 Feb 19 00:07 ../
-rwxrw-r-- 1 spiegl users 1112656 Aug 2 11:07 jarre2.sfk*
-rwxrw---- 1 spiegl users 284823596 Aug 2 11:07 jarre2.wav*
-rwxrw-r-- 1 spiegl users 3000720 Aug 2 11:08 jean.michel.jarre.free.concert.in.paris.1990-Paris.La.Defense.(A.City.in.Concert).sfk*
-rwxrw---- 1 spiegl users 768167980 Aug 2 11:08 jean.michel.jarre.free.concert.in.paris.1990-Paris.La.Defense.(A.City.in.Concert).wav*
hamster:/var/tmp>play jean<TAB>
After that zsh hangs and the cpu load rises and rises.
I had to send it a kill -9 to get rid of it.
I suppose that "feature" is not intended? :-)
Andy.
--
E-Mail: Andy@spiegl.de URL: http://andy.spiegl.de
PGP/GPG: see headers
o _ _ _
--------- __o __o /\_ _ \\o (_)\__/o (_)
------- _`\<,_ _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/
------ (_)/ (_) (_)/ (_) (_) (_) (_) (_)' _\o_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Beware of bugs in the above code; I have only
proved it correct, not tried it." -- Donald Knuth
^ permalink raw reply [flat|nested] 5+ messages in thread
* completion bug?
@ 1999-08-25 14:25 Gabor
0 siblings, 0 replies; 5+ messages in thread
From: Gabor @ 1999-08-25 14:25 UTC (permalink / raw)
To: zsh-users
I have found an interesting completion bug in 3.1.6 which did not
exist in 3.1.5. Here is the gist of it.
$ some_command $(<.s
at this point I hit tab and I have a directory called .ssh. Instead of
completing it, it adds another '.' and then beeps at me. If I complete
the directory name itself, then type tab for the contents, it then
reinserts the directory name again.
$ some_command $(<.ssh/
now it inserts .ssh again after the forward slash. If I type in the
the first character of the name I want completed it works fine. It's
a totally weird bug. You have to try it yourself to understand it. I
tried it in 3.1.5 and it didn't do this.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2000-08-02 13:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-25 14:58 completion bug? Sven Wischnowsky
1999-08-25 16:07 ` Gabor
-- strict thread matches above, loose matches on Subject: below --
2000-08-02 13:15 Sven Wischnowsky
2000-08-02 10:49 Andy Spiegl
1999-08-25 14:25 Gabor
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).