Merovius/shellex — pull request #15 by breunigs (2013-08-17 14:40:00+00:00)
Title: simplify esc-exit a bit

As far as I can tell, this is the intended way for something like this. bindkey only accepts widget functions and widget functions are defined by calling `zle -N` on a shell function. It is not possible to directly call builtins.

A shorter version would be `bindkey -s '^[' '^qexit\n'`, but that effectively types for the user. I.e., on hitting esc, it writes `^qexit\n`. This works fine until the users decides to rebind `^q`, so it shouldn’t be used as default.

These are the only two methods that have been suggested on [the zsh mailinglist](http://www.zsh.org/mla/users/2011/msg00171.html), so I doubt it gets any simpler than this.