Re: TRAPINT breaks consecutive menu-complete
Bart Schaefer <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <CAH+w=7Z9mj+W1smaqEMems5w3WHXoOD7KCQfnsPj9i8MQUaAzA@mail.gmail.com> |
On Thu, Feb 6, 2025 at 8:10 AM Tomasz Pala <[email protected]> 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. > $ 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: The return status from the function is handled specially. If it is zero, the signal is assumed to have been handled, and execution continues normally. Otherwise, the shell will behave as interrupted except that the return status of the trap is retained.