Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] out of memory error after "edit-command-line"
- X-seq: zsh-workers 50792
- From: Jun T <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] out of memory error after "edit-command-line"
- Date: Wed, 19 Oct 2022 18:12:32 +0900
- Archived-at: <https://zsh.org/workers/50792>
- In-reply-to: <CC437935-AE7B-457B-9761-B3DD2695DD7F@kba.biglobe.ne.jp>
- List-id: <zsh-workers.zsh.org>
- References: <CA+rB6GJLBv1uRauTnBAPihETrzox8wC1wXT8KsZ=J8r2y+qeMA@mail.gmail.com> <CA+rB6GLESuh=VAybFCg9RrTJ-C2_wQ8XUc4G6OGaEyEX=QRw9A@mail.gmail.com> <CAH+w=7bBF+5vW_gQSuxAH8wqqJGztn+_y5rxG567c=NUcC+ohA@mail.gmail.com> <CAH+w=7briYScsSHJs9Hz-H+t3QXvZ8mBEe_XZVmD2FoNZZiraQ@mail.gmail.com> <CC437935-AE7B-457B-9761-B3DD2695DD7F@kba.biglobe.ne.jp>
> 2022/10/19 0:07, Jun. T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>
> EMACS/VI:
> % bindkey -v
> % () { setopt localoptions emacs; }
> % (still using emacs binding)
> We need to restore the keymap in doshfunc() as in dosetopt().
Sorry, I reconsidered this.
zle builtin has an option '-K keymap' to temporarily change the
keymap. I think users need not (or should not) use
'setopt localoptions emacs'.
Use of EMACS/VI should be highly discouraged, since turning them off
has no effect, and they are meaningless if a user-defined keymap
is in use.
Moreover, even with my patch, the following does not work:
% export VISUAL=vim
% zsh -f
% (vi keymap, but VI is not set)
% () { setopt localoptions emacs; ... }
% (now emacs keymap)
Instead of fixing this problem, I feel it is better to do
nothing for 'setopt localoptions emacs'. Then keymap is not
restored, but we can just say "please use zle -K".
Maybe we can add some more comments to the description of
EMACS and VI options in zshoptions(1), indicating that
use of these options is _highly_ discouraged.
Or should we try to restore the keymap?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author