bug-bash
[Top][All Lists]
Advanced

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

Re: Bash stays in the secondary prompt (PS2) after completing a command


From: Chet Ramey
Subject: Re: Bash stays in the secondary prompt (PS2) after completing a command with `edit-and-execute-command'
Date: Fri, 12 May 2017 09:35:05 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 5/12/17 8:42 AM, Eduardo Bustamante wrote:
> This issue came up in the following help-bash thread:
> http://lists.gnu.org/archive/html/help-bash/2017-05/msg00001.html
> 
> Write: <echo '> then hit return. Bash will output the secondary
> prompt, because it expects the user to close the single quote. Run
> `edit-and-execute-command' to fix the input (e.g. <echo 'x'>). Bash
> will then execute the command, but it'll output the secondary prompt
> again, expecting the user to close the single quote.

It's meant to work like that, and always has.

The command is executed in a separate context, exactly the same as
running fc on a command from the history file (in fact, that's what
happens).  It's meant to not affect the contents of the current
command line. That's how Posix specifies it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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