On Wed, Dec 29, 2021 at 11:59 AM Bakul Shah <bakul@iitbombay.org> wrote:
To expand on this a bit, the “cd ..” case can be handled by not storing a ..
link in a dir. in the first place! Store the $PWD path in the u struct. Then
cd .. would simply lop off the last component, if one exists. Thus .. takes
you back only on the path you used! This also takes care of the issue with
symlinks (& does what csh did in user code).
Which is exactly the problem  ...   Your solution works as a runtime fix, sometimes.  It's hardly sufficient and why I hate symlinks thank you.