Hacker News new | ask | show | jobs
by banana_giraffe 3028 days ago
I long ago wrote a cd replacement for Windows. It does a few clever things I like, but I always felt slightly unclean for how it works. Since it's external to cmd, it has to find the cmd parent-process that launched it, write a thread into the process space, then launch that thread that does the call to SetCurrentDirectory and updates the necessary environment variables.

It works, but I'm not entirely sure it should work.