Nobody is calling true or false in a script with options/arguments. Nobody hss ever seen true/false fail because they crashed in setlocale. Nobody's highest, second-highest, or 1000th-highest risk to their code is the performance of their true/false implementation.
But it's a really easy thing to have opinions about. You use UNIX for one week and suddenly you're exactly as qualified as Dennis Ritchie to have opinions on the matter.
The conditionally defined shell function in one of the other answers is a more appealing approach, especially given the native behaviours of some shells with respect to variable expansion. But also given that /bin/true is not necessarily the pathname.
% export BLAH='/bin/true too'
% dash -c '$BLAH 1 2 3'
% dash: 1: /bin/true: not found
% sh -c '$BLAH 1 2 3'
/bin/true: not found
% ksh -c '$BLAH 1 2 3'
ksh: /bin/true: not found
% zsh -c '$BLAH 1 2 3'
zsh:1: no such file or directory: /bin/true too
% bash -c '$BLAH 1 2 3'
bash: /bin/true: No such file or directory
%
% export BLAH='/usr/bin/true too'
% zsh -c '$BLAH 1 2 3'
zsh:1: no such file or directory: /usr/bin/true too
% bash -c '$BLAH 1 2 3'
% ksh -c '$BLAH 1 2 3'
% dash -c '$BLAH 1 2 3'
%
Yeah, that was my answer -- and actually I wrote /usr/bin/true on SO but got sloppy here.
I wrote that answer because I recalled it as a common idiom in autoconf or something -- some automake system I'd seen where the system seeks out the tools it needs and defines them as variables.
Yeah, options include a noop function (which is nice because you can change it to noop () { echo "Skipping $@" >&2 ; }) or the shell builtin :, which definitely ignores its arguments.
Nobody is calling true or false in a script with options/arguments. Nobody hss ever seen true/false fail because they crashed in setlocale. Nobody's highest, second-highest, or 1000th-highest risk to their code is the performance of their true/false implementation.
But it's a really easy thing to have opinions about. You use UNIX for one week and suddenly you're exactly as qualified as Dennis Ritchie to have opinions on the matter.