.. is a directory entry in the current directory. It is a hardlink to the directory one level up.
/base/symlink/.. is actually the same file as
/some_other_dir/.., and it is
some_other_dir is itself also a symlink to somewhere else).
In most shells,
.. specially, that is instead of treating it as the
.. directory entry, occurrences of
.. are interpreted by
cd (and not by the system's pathname resolution) as removing one level of directory.
As an example, in
cd a/b/.., the shell does a
chdir("a") instead of doing a
chdir("a/b/.."). To get the latter, you need to do
cd -P a/b/...
It's important to realise that it only applies to
cd (and only in some shells), (IMO, a misfeature), not to
vi or anything else (unless that anything else is a script written with those shells).
In those shells where
cd does that logical interpretation of
pwd builtin and the
$PWD variable contain the logical current directory instead of the real (physical) one, that is one with possibly symlink directory components. Similarly, you can use
pwd -P to get the physical working directory.
Now, if you want to do
And actually mean:
Regardless of whether
/A/b was a symlink or not, you could do instead:
anything-but-cd "$(dirname -- "$PWD")/c"