bug-bash
[Top][All Lists]
Advanced

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

Re: Problem when editing cmd-line with external editor


From: Chet Ramey
Subject: Re: Problem when editing cmd-line with external editor
Date: Tue, 05 Aug 2003 09:52:51 -0400

> Machine Type: i386-pc-linux-gnu
> 
> Bash Version: 2.05a
> Patch Level: 0
> Release Status: release
> 
> Description:
>   When invoking an external editor in "set -o vi"-mode and issuing a "cd 
> anywhere"-command,
>   the PS1 is updated delayed

PS1 will not be updated until the next time the shell either prints the
prompt itself or calls readline().

The command you execute after doing the history edit effectively happens
during the same call to readline().  readline() doesn't return until you
accept the line with a newline, and the shell doesn't update PS1 until
after readline() returns, the command is executed, and it's ready to call
readline() again.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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