Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: SIGINT/TRAPINT Behaves Differently in 4.3.11



On Oct 2, 12:23pm, Julien Nicoulaud wrote:
>
>     TRAPINT () {
>   zle && print -s -- $BUFFER
>   return $1
> }
> 
> Since 4.3.11, the following sequence gets the shell stuck with a
> "TRAPINT:1: command not found: -s" error message:
>  - Type something
>  - Call _complete_help
>  - <Ctrl><C>

Doe you imply here that _complete_help is taking a long time to run for
some reason and you therefore interrupt it?  I tried simulating that by
inserting a "sleep" into the _complete_help function ... interrupting
_complete_help results in the command line not being redrawn, but it
doesn't hang or give an error.

Or is it that you interrupt at the command line after _complete_help
finishes?  That works for me (though there may be a better way to
accomplish it now that the ZLE_LINE_ABORTED parameter can be used).

The error message seems to mean that you've somehow made the word "print"
disappear, e.g., you've got an alias for it that was defined before the
TRAPINT was defined.



Messages sorted by: Reverse Date, Date, Thread, Author