bug-bash
[Top][All Lists]
Advanced

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

Re: Symlinks handled inconsistently by cd and wild card expansion


From: Chet Ramey
Subject: Re: Symlinks handled inconsistently by cd and wild card expansion
Date: Thu, 30 Mar 2017 11:28:58 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 3/30/17 3:13 AM, Topi Mäenpää wrote:

> Bash Version: 4.3
> Patch Level: 11
> Release Status: release
> 
> Description:
> 
> The cd command remembers where I came from, and "cd .." from a
> symlinked directory comes back to the directory of the link. Wild card
> expansion works differently and always reads the link target. I
> understand the reason in general, but it would make sense that they
> behaved the same when used on the command line.

You should run `cd -P' or `set -o physical' to get the behavior you
want.  Posix defines `cd' to behave in the logical file system fashion
that bash does.

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



reply via email to

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