Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-21 Thread Chet Ramey
On 6/20/20 7:32 PM, Ángel wrote: > The hidden command "cd ." changed us into a completely different > directory. Perhaps unexpected for the user (why did the bash version > changed completely in the middle of a test run??). > > Reading the above POSIX link, I would expect cd -P . not to have

Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-20 Thread Ángel
On 2020-06-20 at 14:02 -0400, Chet Ramey wrote: > It's a way to make sure PWD is correct after a `cd'. Without options, `cd' > canonicalizes its pathname argument in the way POSIX describes in > > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html#tag_20_14 > > That converts it

Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-20 Thread Chet Ramey
On 6/20/20 1:28 PM, Lawrence Velázquez wrote: > Here's something fun though: > > $ PROMPT_COMMAND='cd .' > $ readlink /tmp > private/tmp > $ mkdir /tmp/old > $ cd /tmp/old > $ echo "$PWD" > /tmp/old > $ mv /tmp/old /tmp/new > $ echo "$PWD" > /private/tmp/new > > Not wrong, but maybe unexpected

Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-20 Thread Chet Ramey
On 6/19/20 8:51 PM, corr...@goncalo.pt wrote: > > When we rename the current working directory, $PWD doesn't get updated > as it would as it would if we just did a simple "cd directory". Of course not. There is no mechanism to inform the shell that the file system has changed from underneath it.

Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-20 Thread Lawrence Velázquez
> On Jun 20, 2020, at 11:26 AM, Ilkka Virta wrote: > >> On 20.6. 3.51, corr...@goncalo.pt wrote: >> >> When we rename the current working directory, $PWD doesn't get updated >> as it would as it would if we just did a simple "cd directory". Fix: >> Probably: Trigger the current working

Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-20 Thread Ilkka Virta
On 20.6. 3.51, corr...@goncalo.pt wrote: When we rename the current working directory, $PWD doesn't get updated as it would as it would if we just did a simple "cd directory". Fix: Probably: Trigger the current working directory refresh event, like it is already done with the cd command.

Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-19 Thread Lawrence Velázquez
Hi, > On Jun 19, 2020, at 8:51 PM, corr...@goncalo.pt wrote: > > Bash Version: 5.0 > Patch Level: 11 > Release Status: release > Description: > When we rename the current working directory, $PWD doesn't get updated > as it would as it would if we just did a simple "cd directory". Because > of

Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-19 Thread correio
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches