Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Wrong PWD with chasedots



Hello,

I encountered a strange behavior with chasedots. pwd is correct but PWD
not. I re-used the example given in man page. With chasedots deactivated:

    # pwd
    /foo
    # ls -l
    total 0
    lrwxrwxrwx 1 marc marc 8 Nov  7 20:07 bar -> /alt/rod
    # cd bar
    # pwd
    /foo/bar
    # pwd -P
    /alt/rod
    # echo $PWD
    /foo/bar
    # cd ..
    # pwd
    /foo
    # echo $PWD
    /foo

With chasedots activated:
    # pwd
    /foo
    # setopt chasedots
    # cd bar
    # pwd
    /foo/bar
    # pwd -P
    /alt/rod
    # echo $PWD
    /foo/bar
    # cd ..
    # pwd
    /alt
    # pwd -L
    /alt
    # pwd -P
    /alt
    # echo $PWD
    /
I expected the last output to be /alt. Since my prompt uses $PWD and not
`pwd` I have a a wrong path reported in my prompt. I quickly started
looking at code, but thought that some here have better overview
of what's going on.

Thanks,

Marc.



Messages sorted by: Reverse Date, Date, Thread, Author