bug-bash
[Top][All Lists]
Advanced

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

Re: pwd and prompt don't update after deleting current working directory


From: David Hedlund
Subject: Re: pwd and prompt don't update after deleting current working directory
Date: Fri, 12 Jul 2024 03:53:01 +0200
User-agent: Mozilla Thunderbird


On 2024-07-12 00:54, Lawrence Velázquez wrote:
On Thu, Jul 11, 2024, at 6:08 PM, David Hedlund wrote:
#### Expected behaviour
When a directory is deleted while the user is inside it, the terminal
should automatically return to the parent directory.

```
user@domain:~/test$ mkdir ~/test && cd ~/test && touch foo && ls
foo
user@domain:~/test$ rm -r ~/test
user@domain:~/$
```
Why do you expect this behavior?  Other shells and utilities typically
do what bash does -- i.e., nothing.

(You're free to argue that bash *should* behave this way, but that's
a feature request, not a bug report.  And having bash automatically
update its working directory based on filesystem changes would open
up its own can of worms.)

Thanks, Lawrence! I found this discussion helpful and believe it would be a valuable feature to add. Can I submit this as a feature request?



reply via email to

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