[Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-12 Thread Andrés Rodríguez Reina
Subject: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-Smvc

grammar error in Bash Reference Manual

2025-02-12 Thread LY
Hi, I think there is a grammar error in this sentence in https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html  "but double quote characters in expression are not treated specially are removed." This sentence should be changed to "but double quote characters in ex

Re: "printf %d ''" should diagnose the empty string

2025-02-12 Thread Oğuz
On Thursday, February 13, 2025, Martin D Kealey wrote: > > Arguing about printf being an external command (or otherwise not part of > Bash) is not relevant when I'm specifically talking about Bash extensions > to the POSIX spec. > Changes made to built-in printf have to be adopted by GNU printf,

Re: grammar error in Bash Reference Manual

2025-02-12 Thread Lawrence Velázquez
On Wed, Feb 12, 2025, at 9:18 PM, LY via Bug reports for the GNU Bourne Again SHell wrote: > I think there is a grammar error in this sentence > in https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html > >  "but double quote characters in expression are not treated > spe

Re: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-12 Thread Andrés Rodríguez Reina via Bug reports for the GNU Bourne Again SHell
>>>to use ~ as file .. >>>'~' n "~" >>>or ./~ Yes I know that. A beginner may not know or may not realize on time. >>>I'm not sure this would fly as the new default. I wouldn't make it default either, but it can easily be activated in ~/.bashrc for beginners.

Re: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-12 Thread Dale R. Worley
Andrés Rodríguez Reina writes: ... > Due to a mistake in coding a script, a folder named '~' was > generated. An unexperienced bash user issued the command "rm -rf ~" by > mistake, intending to delete the '~' folder, but this resulted in > deleting 150GB+ of data at their home directory. It mig

RE: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-12 Thread Andrés Rodríguez Reina
Thank you for taking the time to review this suggestion. I agree that tilde expansion is not ambiguous, this suggestion is here just to help clear the ambiguity in the user's mind/intent. And I also agree that any other substitution is subject to cause the same confusion, but the case with the

Re: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-12 Thread microsuxx
to use ~ as file .. '~' n "~" or ./~ On Wed, Feb 12, 2025, 5:21 PM Andrés Rodríguez Reina wrote: > Subject: [Suggestion] Add warning/error when using the tilde expansion in > a folder where the tile-named file/folder exists > > Configuration Information [Automatically generated, do not change]:

Re: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-12 Thread microsuxx
or \~ On Wed, Feb 12, 2025, 9:05 PM microsuxx wrote: > to use ~ as file .. > > '~' n "~" > or ./~ > > On Wed, Feb 12, 2025, 5:21 PM Andrés Rodríguez Reina > wrote: > >> Subject: [Suggestion] Add warning/error when using the tilde expansion in >> a folder where the tile-named file/folder exists

Re: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-12 Thread Lawrence Velázquez
On Wed, Feb 12, 2025, at 2:02 PM, Andrés Rodríguez Reina wrote: > And I also > agree that any other substitution is subject to cause the same > confusion, but the case with the tilde expansion produces more damage > to inexperienced users. I mean: "rm -rf *" just deletes the whole > folder cont

Re: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-12 Thread Lawrence Velázquez
On Wed, Feb 12, 2025, at 10:50 AM, Andrés Rodríguez Reina wrote: > In my opinion, it would be useful to have a warning be issued > when in interactive mode, when at the current working directory a > file/folder named '~' exists, and a command with a parameter starting > with ~ is used (w