Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _complete_debug crashes in zsh_directory_name
On 3 August 2011 11:10, Peter Stephenson <Peter.Stephenson@xxxxxxx> wrote:
> On Wed, 3 Aug 2011 05:26:53 +0200
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> Any ideas? It doesn't crash if I don't have the zsh_directory_name function.
>
> This seems to depend on your set-up, so there's nothing I can do without
> more clues. I'm wondering if the wrapper function is getting called at
> multiple levels in a way that's confusing it, but that's pure guess.
> It appears to have something to do with some prompt but simply putting
> %~ in all my prompts and letting that call the zsh_directory_name hooks
> didn't seem to do anything.
This is enough to reproduce the crash for me:
% zsh -f
localhost% PS1=%~
~autoload -U compinit
~compinit -D
~zsh_directory_name() { }
~<press C-x?>
_complete_debug:9: failed to close file descriptor 3: bad file descriptor
zsh:1: failed to close file descriptor 3: bad file descriptor
zsh: segmentation fault zsh -f
> While we're here, however, we can do a lot better with _complete_debug.
With this patch, the crash is no longer happens here.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author