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


Groups > gnu.bash.bug > #16418

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

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.
Date 2020-06-20 13:50 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.168.1592675435.2574.bug-bash@gnu.org> (permalink)
References <051e2fbabf3a9912e5d4248efba0f02b@goncalo.pt> <967ce82b-0167-909e-559e-b3a9f78e88fd@case.edu>

Show all headers | View raw


On 6/19/20 8:51 PM, correio@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. The shell knows when it changes
its own working directory, and can adjust $PWD accordingly. In fact,
that is the only thing that changes $PWD.

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

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


Thread

Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder. Chet Ramey <chet.ramey@case.edu> - 2020-06-20 13:50 -0400

csiph-web