Colon command (:
) :
The : (colon) command is used when a command is needed, as in the then condition of an if command, but nothing is to be done by the command. This command simply yields an exit status of zero (success). This can be useful, for example, when you are evaluating shell expressions for their side effects.
from IBM: https://www.ibm.com/docs/en/zos/2.4.0?topic=descriptions-colon-do-nothing-successfully
https://rednafi.com/misc/colon_command_in_shell_scripts/ by Redowan Delowar shows how to use it when debugging with -x
flag.
Ned Batchelder uses this in his git aliases for instructing zsh autocomplete to use git show
’s autocompletions.