From 4b3e08dc7f91e4db8dd1994e88ff377ba4923fc2 Mon Sep 17 00:00:00 2001 From: David F Glidden Date: Tue, 25 Aug 2026 18:39:14 +0200 Subject: [PATCH] [FIX] zsh ate the question mark before the wrapper ran MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'tarbuckle opinion?' failed at '(eval):1: no matches found' — zsh expands ?, * and [ as globs before the script is reached, and asking him a question is the natural use of the one surface built for questions. Three ways past it, and the wrapper's help now names all three in order of least fuss: drop the ?, quote the phrase, or the noglob alias now in shell/.zshrc. ⚠ The alias is listed LAST and with its limit stated, because it only helps if the calling shell is interactive — .zshrc is not read otherwise — and that is exactly the kind of fix that looks total and silently is not. noglob for one command rather than 'unsetopt nomatch', which would change how every command in the shell behaves to fix one of them. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01J6hZXNYSxEfZseBGTni4sf --- bin/tarbuckle | 9 ++++++++- shell/.zshrc | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bin/tarbuckle b/bin/tarbuckle index 32ebe34..f914146 100755 --- a/bin/tarbuckle +++ b/bin/tarbuckle @@ -3,6 +3,13 @@ # # ! tarbuckle call him by name; he answers at length # ! tarbuckle what now ask him something +# ! tarbuckle "opinion?" a QUESTION MARK must be quoted, or dropped +# +# ⚠ zsh expands `?`, `*` and `[` as globs before this script is ever reached, so an +# unquoted `tarbuckle opinion?` dies at "no matches found" in the shell. Three ways +# past it, in order of least fuss: drop the `?`, quote the phrase, or rely on the +# `alias tarbuckle='noglob tarbuckle'` in shell/.zshrc — which only helps if the +# calling shell is interactive, since that is the only kind that reads .zshrc. # ! tarbuckle mute silence the utterances; he stays in the room # ! tarbuckle off remove him entirely # ! tarbuckle on bring him back @@ -31,6 +38,6 @@ PY r="$HOME/.claude/state/tarbuckle-rejects.jsonl" [ -f "$r" ] && echo "silences: $(wc -l < "$r" | tr -d ' ') logged (net rejections + timeouts)" || true ;; - --help|-h) sed -n '2,14p' "$0" | sed 's/^# \{0,1\}//' ;; + --help|-h) sed -n '2,22p' "$0" | sed 's/^# \{0,1\}//' ;; *) exec python3 "$S/tarbuckle-invoke.py" "$@" ;; esac diff --git a/shell/.zshrc b/shell/.zshrc index 01edaf0..07c634b 100644 --- a/shell/.zshrc +++ b/shell/.zshrc @@ -205,4 +205,11 @@ typeset -U path PATH # - Each section has clear purpose and boundaries # - Graceful degradation when tools are missing # - Performance considerations for different use cases -# - Modular structure for maintainability \ No newline at end of file +# - Modular structure for maintainability + +# Tarbuckle — call him by name with an actual question. +# zsh treats `?` (and `*`, `[`) as globs, so `tarbuckle opinion?` dies at +# "no matches found" before the wrapper is ever reached. noglob suspends filename +# generation for this command only. Not `unsetopt nomatch`, which would change how +# every command in the shell behaves to fix one of them. +alias tarbuckle='noglob tarbuckle'