[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug on bash shell - $PWD (and consequentely prompt) not updated whil
From: |
Chet Ramey |
Subject: |
Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder. |
Date: |
Sat, 20 Jun 2020 13:50:24 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 |
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/
Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.,
Chet Ramey <=