[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash is incorrectly and inconsistently expanding tilde in $PATH
From: |
Chet Ramey |
Subject: |
Re: Bash is incorrectly and inconsistently expanding tilde in $PATH |
Date: |
Sat, 6 May 2017 16:51:27 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 |
On 5/4/17 5:00 PM, Ángel wrote:
> No. IMHO the fix would be to expand ~ at assignment time, even when
> quoted, ie. PATH='~/bin' would be equivalent to PATH=~/bin
No. The semantics of expansion in quoted strings are well defined.
Performing tilde expansion on a quoted string in an assignment statement,
even if restricted to PATH, would definitely be a bug.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
Re: Bash is incorrectly and inconsistently expanding tilde in $PATH, Chet Ramey, 2017/05/06