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

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 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 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

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. $