bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Builtins should canonicalize path arguments


From: Chet Ramey
Subject: Re: Builtins should canonicalize path arguments
Date: Thu, 09 Jan 2014 14:19:20 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 1/9/14 12:42 PM, Ondrej Oprala wrote:
> Hi, I investigated this bug report:
> https://bugzilla.redhat.com/show_bug.cgi?id=987975
> and found out that some of bash's builtins (source at the very least) do
> not canonicalize
> pathnames given as arguments (builtin "open" is instead fed with the path -
> failing in the BZ case).
> The builtin "cd" seems to handle relative paths correctly. I think it would
> be reasonable to take part of
> cd's canonicalization code and use it in other builtins as well. I'd gladly
> take care of the patch.
> Would upstream consider this a good approach?

I have reservations.  If the user in question wants consistent behavior,
I suggest he use `set -o physical' for a while and see if it does what
he wants.  The solution might be that simple.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]