On 5/12/13 6:50 PM, Peng Yu wrote:
> Hi,
> 
> I have vi mode set.
> 
> set -o vi.
> 
> Then I type v to enter the vi editor. In the vi editor, I type 'cd
> /tmp'. Then, I get the following screen output. Notice that the prompt
> does not change immediately after the cd command. Could anybody
> reproduce this behavior? Thanks.
> 
> ~$
> cd /tmp
> ~$ echo $PWD
> /tmp
> /tmp$

This all happens within the context of the same call to readline().  PS1
isn't reevaluated until before the next readline() call.

>From the bash/readline perspective, this is just an editing command that
causes other shell commands to be executed.  There's no equivalent of
`accept-line' there that would return control to the parser.

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

Reply via email to