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

Re: -o nobanghist -o emacs segfaults



> On 03 April 2020 at 09:11 Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> % b/Src/zsh -f -o nobanghist -o emacs
> zsh: segmentation fault  b/Src/zsh -f -o nobanghist -o emacs

The option parser is passing the keymap to ZLE, which hasn't been loaded yet.
Attempting to load it doesn't work because at the point of initial option parsing
the basic definitions for the module system aren't set up.

Moving up the initialisation of the module system could possibly expose some hairy
dependencies.

Probably the right thing to do is to detect this condition, remember the keymap,
and pass it in later.  I'm not entirely sure where the best place for this is,
but as it's specific to initialisation and depends on the sequencing of that I
suppose up in that code, rather than down in anything ZLE-specific.  But
at least the option parser needs to be aware this is init rather than run time.

(See my previous ramblings on the theme "ZLE isn't really a self-contained module in
the fullest acceptance of the term".)

pws



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