Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: TRAPINT breaks consecutive menu-complete
- X-seq: zsh-users 30199
- From: Tomasz Pala <gotar@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: TRAPINT breaks consecutive menu-complete
- Date: Fri, 7 Feb 2025 07:51:12 +0100
- Archived-at: <https://zsh.org/users/30199>
- In-reply-to: <CAH+w=7Z9mj+W1smaqEMems5w3WHXoOD7KCQfnsPj9i8MQUaAzA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <20250206160947.GB13517@polanet.pl> <CAH+w=7Z9mj+W1smaqEMems5w3WHXoOD7KCQfnsPj9i8MQUaAzA@mail.gmail.com>
On Thu, Feb 06, 2025 at 19:52:26 -0800, Bart Schaefer wrote:
> On Thu, Feb 6, 2025 at 8:10???AM Tomasz Pala <gotar@xxxxxxxxxx> wrote:
>>
>> $ ls [tab, tab -- starts menu completion] [ctrl-c] [tab, tab -- completion again]
>
> This is the expected/defined behavior -- interrupt takes you out of
> completion and back to the "top" level keybindings.
That's clear - but what is above "top" level keybinding?
Because that's where TRAPINT directs:
$ ls [tab, tab -- starts menu completion] [ctrl-c]
[tab, tab - nothing happens, 3rd tab required]
^^^^^^^^^^^^^^^^
>> $ function TRAPINT { return 1; }
>
> If you want ^C to NOT take you out of completion, you have to return
> zero from your trap. From the doc:
I want ^C to take me out to the initial state, but it leaves something
wrong - above function should not change completion behavior, but it does.
BTW returning 0 also behaves badly, as it leaves completion on, yet
clears the menu below, so the completion entries appear after movement
(e.g. arrows) over each of them separately.
--
Tomasz Pala <gotar@xxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author