GNU bug report logs -
#66903
29.1; shell-mode directory tracking incorrectly handles double slashes
Previous Next
Full log
Message #43 received at 66903 <at> debbugs.gnu.org (full text, mbox):
[வெள்ளி நவம்பர் 03, 2023] Stefan Kangas wrote:
> It would be highly dangerous to start mangling command lines to shells
> run under `M-x shell' in incompatible ways. Not to mention that such a
> change would be backwards-incompatible. Consider the command
>
> sudo rm -rf ~//usr
>
> This is not a contrived example, BTW, but more or less exactly a command
> I have run in the last year. I don't think I used //, but double
> slashes are always collapsed in POSIX, so I can't be sure. It's not
> something I look for that when cobbling together shell commands in
> POSIX-compatible shells (bash and zsh here).
>
> So I think we should not do that.
A more common scenario I can think of is output of commands not
sanitising the filenames to change the double slashes to a single slash.
When you copy such a filename from the output to the comint prompt as
part of a command and experience a different behaviour when you send the
command, it would be annoying IMO. I copy the filename from the output
precisely to avoid typing-and-editing, I don't want to do it more.
This bug report was last modified 1 year and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.