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

Re: How to execute a command upon loading a module



On Oct 9,  5:09pm, DervishD wrote:
} 
}     I want to modify the listscroll and menuselect keymaps when
} zsh/complist (this is the module which defines it, isn't it?

Yes.

}     Since the keymaps doesn't exist until the module is loaded, I
} cannot modify them to my likings :(( Can I execute shell code just
} after a module is loaded?

No, there is no emacs-like eval-after-load hook.

} Can I *create* those keymaps, modify them and expect the corresponding
} modules doesn't modify them again?

No, the module forcibly re-creates and initializes the keymap, discarding
any existing keymap by that name -- and unloading the module deletes the
keymap.  It'd be nice if complist were a little more careful about this,
i.e., check whether the keymap exists and selectively update it, but no.

The only thing you can do is explicitly load the module and then change
the bindings.



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