logoalt Hacker News

mqustoday at 12:33 PM2 repliesview on HN

Is : the same as `true` ?


Replies

Linux-Fantoday at 1:43 PM

I was asking myself the same question and looked it up:

<https://pubs.opengroup.org/onlinepubs/9799919799/utilities/t...>

The most important differences seem to be:

* `:` is a builtin vs. `true` is an utility * passing arguments to `:` is safe but for `true` its not hence `:` is the right thing to use here.

hidrototoday at 1:18 PM

the fish shell manpage has ':' as an alias to 'true'.