From b0934e5646a2e4dfcb86a16de25646e9569784bb Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Mon, 7 Sep 2026 07:56:52 -0700 Subject: [PATCH] docs(appearance): describe the /dev/null operand __omz_test_cmd_args appends The doc comment didn't explain why the diff probe passes /dev/null explicitly, which read as a mistake rather than the second operand diff requires. Co-Authored-By: Claude Opus 5 (1M context) --- lib/theme-and-appearance.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index e69daa5a3..a5037e335 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -22,8 +22,10 @@ __omz_probe_cached=("$__omz_probe_cache"(Nm-1)) function __omz_test_cmd_args { # Usage: __omz_test_cmd_args cmd args... - # e.g. __omz_test_cmd_args gls --color - # Runs `cmd args... /dev/null` and remembers whether it succeeded + # Runs `cmd args... /dev/null` and remembers whether it succeeded, so a + # command needing two operands passes the first one itself: + # e.g. __omz_test_cmd_args gls --color -> gls --color /dev/null + # __omz_test_cmd_args diff --color /dev/null -> diff --color /dev/null /dev/null local key="$*" if (( ! ${+__omz_probes[$key]} )); then command "$@" /dev/null &>/dev/null