symlink bypasses bash_enter
cflor opened this issue · 5 comments
hey dave :)
i came across an issue. steps to reproduce:
- create a symlink from outside a directory hierarchy observed by smartcd, to some directories into that hierarchy.
eg: ln -s dir_with_env_set_by_smart_cd/one_dir_in/second_dir_in second_level - cd into it using the symlink
eg: cd second level
Result:
though I end up at the right destination, the system variables from bash_enter are not being set
commit 2d859e1 fixes cd -P which is what should be used in this situation. It's not clearly desirable to only support one behavior or the other (run scripts for link path vs for physical path) but with the current situation you are able to be explicit about what you want, which is as good as I can do for now.
Commit efd2494a (for which I have just submitted a pull request) fixes this issue - i.e. it allows smartcd to properly handle symlinks, without the user having to remember to use 'cd -P'.
@cxreg - was there any decision on whether to accept @garethstockwell's PR? I just bumped into this issue
Any update on this?
Actually, for now I have settled on the cd -P
option via an alias. Apologies for the noise