Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16264

PS1's \w is misleading following edit-and-execute-command

Newsgroups gnu.bash.bug
Date 2020-05-01 23:13 -0700
Message-ID <c6dfc745-de14-4f6f-95b4-40893cf55b8b@googlegroups.com> (permalink)
Subject PS1's \w is misleading following edit-and-execute-command
From ami@fischman.org

Show all headers | View raw


In the following, PS1's \w is a lie in the penultimate prompt:

~ $ env -i - HOME=~ TERM=$TERM PS1='\w $ ' EDITOR="emacs -q" bash --noprofile --norc
~ $ echo hello
hello
~ $ # <C-x C-e> cd /tmp C-x C-s C-x C-c
cd /tmp
~ $ pwd
/tmp
/tmp $

This seems related to
https://groups.google.com/forum/#!topic/gnu.bash.bug/GfKlIMsvPrY
but I can't tell from the exchange there how this behavior could be
considered correct.
ISTM that after C-x C-e instead of redisplaying the previous prompt
an entirely new one should be computed, reflecting potential effects
of the C-x C-e'd command.

Cheers,
-a

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

PS1's \w is misleading following edit-and-execute-command ami@fischman.org - 2020-05-01 23:13 -0700

csiph-web