Re: Tilde is expanded in $PATH, inconsistent behavior

2025-02-03 Thread Lawrence Velázquez
On Mon, Feb 3, 2025, at 2:57 PM, dale.wor...@comcast.net wrote: > Within that context, if an element of PATH contains a '~' character, you > don't expect that to cause execution requests to look in your home > directory, because '~' isn't the name of your home directory. Yes, that was the whole po

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-02-03 Thread Dale . Worley
Subject: Re: Tilde is expanded in $PATH, inconsistent behavior Date: Mon, 27 Jan 2025 15:21:06 -0500 Keith Thompson writes: > The "Tilde Expansion" section of the bash manual does talk about > using '~' when setting $PATH, but that applies only when setting

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-01-24 Thread Keith Thompson
On Fri 2025-01-24 11:45:22 EST, Chet Ramey wrote: > On 1/23/25 9:15 PM, Keith Thompson wrote: > > > But I don't see anything in the "Tilde Expansion" section that > > documents the behavior of a literal '~' in $PATH. > > It remains undocumented. Then I suggest that the phrase "as described above u

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-01-24 Thread Chet Ramey
On 1/23/25 9:15 PM, Keith Thompson wrote: But I don't see anything in the "Tilde Expansion" section that documents the behavior of a literal '~' in $PATH. It remains undocumented. I suggest it would be better to document the behavior, since I imagine it's fairly easy to run into it accident

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-01-24 Thread Chet Ramey
On 1/23/25 6:37 PM, Keith Thompson wrote: Bash Version: 5.2 Patch Level: 32 Release Status: release Description: A literal '~' or other tilde-prefix at the beginning of an element of $PATH is expanded when a command is executed from the bash prompt. This is undocumented and inco

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-01-23 Thread Greg Wooledge
On Thu, Jan 23, 2025 at 18:15:38 -0800, Keith Thompson wrote: > $[...] appears to behave like $((...)). Is it equivalent? It was the proposed syntax for arithmetic in a POSIX draft a couple decades ago. Bash implemented it, and it started to catch on. But then POSIX went with $(( )) instead. $

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-01-23 Thread Keith Thompson
On Thu, Jan 23, 2025 at 5:31 PM Lawrence Velázquez wrote: > > On Thu, Jan 23, 2025, at 6:37 PM, Keith Thompson wrote: > > Description: > > A literal '~' or other tilde-prefix at the beginning of an > > element of $PATH is expanded when a command is executed > > from the bash prompt. T

Tilde is expanded in $PATH, inconsistent behavior

2025-01-23 Thread kst
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Werror=implicit-function-declaration -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-01-23 Thread Lawrence Velázquez
On Thu, Jan 23, 2025, at 6:37 PM, Keith Thompson wrote: > Description: > A literal '~' or other tilde-prefix at the beginning of an > element of $PATH is expanded when a command is executed > from the bash prompt. This is undocumented and inconsistent with > the behavior of other c

Tilde is expanded in $PATH, inconsistent behavior

2025-01-23 Thread Keith Thompson
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Werror=implicit-function-declaration -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-p