|
From: | David Hedlund |
Subject: | Re: pwd and prompt don't update after deleting current working directory |
Date: | Tue, 16 Jul 2024 09:47:29 +0200 |
User-agent: | Mozilla Thunderbird |
On 2024-07-12 15:10, Chet Ramey wrote:
Do you think that it would be appropriate to submit this feature request to the developers of the rm command instead.On 7/11/24 9:53 PM, David Hedlund wrote: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?I'm not going to add this. It's not generally useful for interactive shells, and dangerous for non-interactive shells. If this is a recurring problem for you, I suggest you write a shell function to implement the behavior you want and run it from PROMPT_COMMAND. That behavior could be as simple as pwd -P >/dev/null 2>&1 || cd ..
For comparision, caja (file manager in MATE) is stepping back as many directories as needed when it is located in a directory that is deleted in bash or caja.
[Prev in Thread] | Current Thread | [Next in Thread] |