bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subject: Pressing Ctrl-C during any subshell evaluation terminates t


From: felix
Subject: Re: Subject: Pressing Ctrl-C during any subshell evaluation terminates the shell
Date: Tue, 13 Oct 2020 09:38:02 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

Issue 627 in direnv's github project show:

To reproduce this simply:

    PROMPT_COMMAND="trap -- '' SIGINT; sleep 0.1; trap SIGINT;"
    read foo
    ^C           -- will exit current shell --



On Mon, Oct 12, 2020 at 09:52:21PM -0700, Daniel Farina wrote:
> On Sun, Oct 11, 2020 at 12:59 PM Chet Ramey <chet.ramey@case.edu> wrote:
> > What commands does this `direnv' command output?
> 
> _direnv_hook() {
>   local previous_exit_status=$?;
>   trap -- '' SIGINT;
>   eval "$("{{.SelfPath}}" export bash)";
>   trap - SIGINT;
>   return $previous_exit_status;
> };

-- 
 FĂ©lix Hauri  -  <felix@f-hauri.ch>  -  http://www.f-hauri.ch



reply via email to

[Prev in Thread] Current Thread [Next in Thread]