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

2024-08-14 Thread felix
Le Tue, Jul 16, 2024 at 09:08:14AM -0400, Chet Ramey a écrit : > On 7/16/24 3:47 AM, David Hedlund wrote: > > > > > > pwd -P >/dev/null 2>&1 || cd .. > > > > > Do you think that it would be appropriate to submit this feature request > > to the developers of the rm command instead. > > You can tr

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

2024-07-19 Thread David Hedlund
On 2024-07-19 07:30, Martin D Kealey wrote: TL;DR: what you are asking for is unsafe, and should never be added to any published version of any shell. On Tue, 16 Jul 2024 at 17:47, David Hedlund wrote: Do you think that it would be appropriate to submit this feature request to the d

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

2024-07-18 Thread Martin D Kealey
TL;DR: what you are asking for is unsafe, and should never be added to any published version of any shell. On Tue, 16 Jul 2024 at 17:47, David Hedlund wrote: > Do you think that it would be appropriate to submit this feature request > to the developers of the rm command instead. > This suggesti

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

2024-07-16 Thread David Hedlund
On 2024-07-16 15:31, Lawrence Velázquez wrote: On Tue, Jul 16, 2024, at 3:47 AM, David Hedlund wrote: Do you think that it would be appropriate to submit this feature request to the developers of the rm command instead. How would this help? The rm utility cannot change the working directory

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

2024-07-16 Thread Lawrence Velázquez
On Tue, Jul 16, 2024, at 3:47 AM, David Hedlund wrote: > Do you think that it would be appropriate to submit this feature request > to the developers of the rm command instead. How would this help? The rm utility cannot change the working directory of the shell that invokes it, or of any other

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

2024-07-16 Thread Chet Ramey
On 7/16/24 3:47 AM, David Hedlund wrote: On 2024-07-12 15:10, Chet Ramey wrote: 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

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

2024-07-16 Thread David Hedlund
On 2024-07-12 15:10, Chet Ramey wrote: 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

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

2024-07-12 Thread Chet Ramey
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 s

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

2024-07-11 Thread Phi Debian
Oops I forgot the reply to all in my reply to @David Hedlund I was on the same tune as you @g...@wooledge.org . == On Fri, Jul 12, 2024 at 12:14 AM David Hedlund wrote: > > > When a directory is deleted while the user is inside it, the terminal > should automati

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

2024-07-11 Thread Greg Wooledge
On Fri, Jul 12, 2024 at 10:26:54 +0700, Robert Elz wrote: > Is it supposed to continually run "stat($PWD, ...)" forever (after > all the directory might be removed from elsewhere while you're in > the middle of typing a command - what do you expect to happen then?) It's even worse: let's say a new

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

2024-07-11 Thread Robert Elz
Date:Fri, 12 Jul 2024 03:53:01 +0200 From:David Hedlund Message-ID: <820e6ee2-7444-4a01-991a-3530c2591...@gnu.org> | 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? Yo

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

2024-07-11 Thread Lawrence Velázquez
On Thu, Jul 11, 2024, at 9:53 PM, David Hedlund wrote: > On 2024-07-12 00:54, Lawrence Velázquez wrote: >> (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

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

2024-07-11 Thread Eduardo Bustamante
On Thu, Jul 11, 2024 at 7:32 PM David Hedlund wrote: (...) > I understand. So the feature request should be an option "-b" (for > bounce out of the directory when deleted) for example? > It'd be helpful to know about the use cases for such feature though. My assumptions: - This would only be u

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

2024-07-11 Thread Eduardo Bustamante
On Thu, Jul 11, 2024 at 7:20 PM David wrote: (...) > Hi, I disagree, and I think if you understand better why this occurs, you > will understand why knowledgable users will disagree, and you will > change your opinion. > I concur. The requested feature changes behavior in a backwards-incompatibl

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

2024-07-11 Thread David Hedlund
On 2024-07-12 04:19, David wrote: n Thu, 11 Jul 2024 at 22:14, David Hedlund wrote: When a directory is deleted while the user is inside it, the terminal should automatically return to the parent directory. Hi, I disagree, and I think if you understand better why this occurs, you will underst

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

2024-07-11 Thread David
n Thu, 11 Jul 2024 at 22:14, David Hedlund wrote: > When a directory is deleted while the user is inside it, the terminal > should automatically return to the parent directory. Hi, I disagree, and I think if you understand better why this occurs, you will understand why knowledgable users will d

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

2024-07-11 Thread David Hedlund
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 ~

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

2024-07-11 Thread Lawrence Velázquez
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@do