Zsh Mailing List Archive
Messages sorted by:
Re: completion inside vared
- X-seq: zsh-users 27526
- From: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Re: completion inside vared
- Date: Sat, 19 Feb 2022 18:27:43 +0100
- Archived-at: <https://zsh.org/users/27526>
- In-reply-to: <CAH+w=7Yj2QB1aJw0CwxXKPuV=ZHzjOx-R19B=qwPyQ-z6BfYeg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAP+y1xDP_=pk2+FMYpa8EV38di-XVv9R2Cynf+awZb0HUV1+=Q@mail.gmail.com> <CAP+y1xDoZzLBAbrPyABfFizasg+PNeu3sehsL-Dg09EdqM3yYA@mail.gmail.com> <CAH+w=7Yj2QB1aJw0CwxXKPuV=ZHzjOx-R19B=qwPyQ-z6BfYeg@mail.gmail.com>
yes that worked (apart from a space to be added between [[and $
I'm having another annoyance:
when I exit with ctrl-c from
vared -ehp $prompt text
the history file gets emptied. I tried
trap 'zle send-break' INT
but it doesn't change the result
Is there something I can do to exit from vared with a key combination (ctrl-d only works if the line is empty) without losing the history?
I could use zle to send the kill-whole-line widget, but how do I send ctrl-d then? Is it possibile with zle to send key combinations?
On Fri, Feb 18, 2022 at 3:09 PM Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
> does anyone has some clue as to where I can find how to do this?
Been busy and didn't have a chance to respond before.
The _in_vared completer forces use of _value which calls _default. A
side-effect of _default is that compctl completions are attempted.
So what you need is:
zstyle ':completion::complete:-value-*:*' use-compctl no
Or if you want it to be specific to vared, something like:
zstyle -e ':completion::complete:-value-*:*' use-compctl '[[
$funcstack = *_in_vared* ]] && reply=no'
which admittedly is a bit convoluted ... _in_vared probably ought to
be doing some style checks of its own rather than pushing everything
down to _value.
Messages sorted by: