Skip to content

Comment on How it took me 20 hours to learn process isolationparent

Comments

You could make it work, if you think about the problem a bit differently. Have your program output a command, like "cd /your/dir", when it exits. Then run it with eval from the shell (assuming a bash shell.)

eval $(yourprogram)

... now, set up an alias: alias something='eval $(yourprogram)'

and there you go. "something" can now change your directory (and do anything else by echoing a command.)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.