Hacker News new | past | comments | ask | show | jobs | submit login

> Why would I want a shell script to change my $CWD after the shell script exits?

If you called the script with the intent that it change your $CWD, obviously.

The solution, of course, is to source the script rather than executing it. This is mentioned in the article, but requires an understanding (at least a minimal one) of subshells to get why - which is precisely what the article addresses.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: