From 787b34b0881ed03c54c1ac659adacbfa75d981a9 Mon Sep 17 00:00:00 2001 From: Ryan Lewis Date: Sat, 30 May 2026 16:26:02 +0100 Subject: [PATCH] fix(release): use positional shell arg for cask completions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v0.4.0's cask set shell_parameter_format: arg, which makes Homebrew invoke `things completions --shell=bash`. `things completions` takes the shell as a positional argument, so it rejected the unknown --shell flag (exit 80) and `brew install` wrote no completion files. Drop shell_parameter_format so Homebrew uses its default — a bare positional arg, `things completions bash` — which matches the CLI. Verified against the installed v0.4.0 binary: `completions --shell=bash` exits 80, `completions bash` exits 0. Includes the v0.4.1 release notes header. Part of #88 --- .github/releases/v0.4.1.md | 22 ++++++++++++++++++++++ .goreleaser.yaml | 7 ++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .github/releases/v0.4.1.md diff --git a/.github/releases/v0.4.1.md b/.github/releases/v0.4.1.md new file mode 100644 index 0000000..113489b --- /dev/null +++ b/.github/releases/v0.4.1.md @@ -0,0 +1,22 @@ +## `things-cli` v0.4.1 — fix Homebrew completion install + +Patch release. v0.4.0 added shell completions, but the Homebrew cask passed the +shell name as `--shell=bash` (Homebrew's `:arg` format) while `things +completions` takes the shell as a positional argument. The mismatch made +`brew install` print "Failed to generate … completions" warnings and write no +completion files. + +### Fix + +- The cask now calls `things completions bash|zsh|fish` with the shell as a bare + positional argument (Homebrew's default when `shell_parameter_format` is + omitted), matching the CLI. `brew install` / `brew upgrade` now generates the + bash, zsh, and fish completion files as intended. + +If you installed v0.4.0 from Homebrew, run `brew update && brew reinstall +ryanlewis/tap/things` to pick up working completions. + +### Requirements + +macOS with Things3 installed. Binaries for Apple Silicon (`darwin_arm64`) and +Intel (`darwin_amd64`). diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 956888e..318552b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -56,12 +56,13 @@ homebrew_casks: binaries: - things # Run `things completions ` at cask install time to drop bash/zsh/fish - # completion scripts into the Homebrew prefix. `` is a positional arg - # (shell_parameter_format: arg) — matches the CLI added in #88 PR 1. + # completion scripts into the Homebrew prefix. The shell name is passed as a + # bare positional arg (`things completions bash`) — that's Homebrew's default + # when shell_parameter_format is omitted. Do NOT set it to `arg`: Homebrew's + # :arg emits `--shell=bash`, which our positional CLI rejects. generate_completions_from_executable: args: [completions] base_name: things - shell_parameter_format: arg shells: [bash, zsh, fish] repository: owner: ryanlewis