Hacker News new | ask | show | jobs
by emmelaich 1371 days ago
And yet ...

https://unix.stackexchange.com/questions/50058/what-is-the-p...

Yes, it's idiotic.

1 comments

The question and highest rated reply there are very interesting and worth reading (at least for trivia value), thanks for that.

I don't understand what you meant is idiotic though

As that comment said, it’s there so utilities can use it for checking the return of “chdir()”. It’s at best a name conflict with a shell command with a well established past and use. At worst, it probably enables some bad code smells or outright malicious code.
I've seen questions about sudo (for instance) that ask why does "sudo chdir" not work.

By idiotic I think it's a mistake to blur the line between shell builtins and external commands.