Marcel Giannelia wrote: > The problem is that some commands are "smart" and "know" how you > got to your current working dir -- bash knows that you're in a symlink > and that the parent dir of the *symlink* (not the actual directory > you're in) is 'basedir'. > > However, this is not the literal meaning of the '..' directory entry > according to the filesystem. Some parts of bash use the "smart" > behaviour (cd and completion), and some parts use what the filesystem > actually says, i.e. that '..' inside 'dir2' is 'dir1', not > 'basedir' (output redirection). > > ...after thinking about this, I've managed to confuse myself and am not > sure which behaviour should be considered correct.
I consider the 'set -o physical' behavior the canonical and correct form. Try it. You might like it. Because it isn't possible to have the shell create a 100% correct facade over the top of everything. And even if it could I am not sure that is desired. However the casual user often prefers the logical view. If you never use symlinks and never rename or move directories then it doesn't matter. Bob