Comment by ButlerianJihad
1 day ago
In the Bash shell, true is a builtin. It may be a builtin for other POSIX-compliant shells. false is also a builtin.
The key difference is that : is required to be builtin. There are several good reasons for this. For example, syntax: the shell can single out this special character syntactically before searching $PATH.
Also, ":" is a disallowed or problematic character for certain filesystem types. If your shell attempted to omit this builtin, it could not always rely on an external command file by this name.
Lastly, people keep bringing up fish, but it is not a POSIX shell, so its similarities in syntax and operation are coincidental.
No comments yet
Contribute on Hacker News ↗