Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug? in complist when filenames are longer than the screen

    Hi Andrey :)

 * Andrey Borzenkov <arvidjaar@xxxxxxxxxx> dixit:
> On Monday 03 October 2005 18:45, DervishD wrote:
> >     Hi all :)
> >
> >     I'm not sure if this is a bug or if I'm doing anything wrong, but
> > I can reproduce it even without reading RC's (neither /etc/zshenv
> > nor /etc/zshrc exist, and I run zsh with "-f").
> >
> >     $ print $ZSH_VERSION
> >     4.2.5
> >     $ touch a b c filename1 filename2 d e
> >     $ zmodload zsh/complist
> >     $ COLUMNS=3
> >     $ ls <TAB><TAB><TAB><TAB><UP><DOWN>
> >
> >     The screen messes up and, depending on the filenames, zsh
> > sometimes segfaults or hangs. 
> It would be nice to have exact recipe how to reproduce a crash preferably 
> starting with zsh -f. I have screen corruption but not (OK I am not sure what 
> sensibly can be done on 3 column width :)

    The above, when run after "zsh -f" and making sure you don't have
any /etc/zshenv not protected by "[[ -o rcs ]]", causes a hangup (not
a crash) in my system. Unfortunately the crash happens randomly, and
seldom. The common case is a hangup, with zsh eating lots of CPU, but
from time to time it crashes.

    With 3 column width you can call "ls" if your PS1 is short enough
XDDDD. BTW, this has happened to me with COLUMNS=100 and a very long
file name, that's why I discovered it. First zsh messed up the
screen, and when I hit <UP> the shell crashed. I haven't been able to
reproduce the crash with that particular example, zsh always hangs
now, but I have had crashes and hangs with the example I provide

> Jokes aside, I do confirm screen corruption during normal completion under 
> konsole and linux console. This happens with long filenames

    Exactly. Any filename whose name length is greater or equal to
$COLUMNS seems to cause the problem.

    Raúl Núñez de Arenas Coronado

Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...

Messages sorted by: Reverse Date, Date, Thread, Author