Skip to content

0.17 Phase 5 PR B — feat(brew): query-aware search + cask split#142

Open
StanMarek wants to merge 3 commits into
masterfrom
feat/brew-query-aware-cask-split
Open

0.17 Phase 5 PR B — feat(brew): query-aware search + cask split#142
StanMarek wants to merge 3 commits into
masterfrom
feat/brew-query-aware-cask-split

Conversation

@StanMarek
Copy link
Copy Markdown
Owner

Summary

  • brew_formulae_searchable now consults ctx.current_token: typed queries call brew search <q> instead of empty search + cap, which only applies to empty-query exploration.
  • Adds brew_casks_searchable (brew search --cask <q>) and brew_packages_searchable (formulae+casks union) providers, plus parsers for both modern (==> Casks) and legacy (Casks:) Homebrew header styles.
  • tools/fig-converter/src/native-map.js routes brew search --cask|--casksbrew_casks_searchable, --formula|--formulaebrew_formulae_searchable, bare → brew_packages_searchable; specs/brew.json switches install/edit/home/abv/search args to brew_packages_searchable (Fig spec model cannot do flag-conditional routing, so the union is the honest choice).

References: docs/plans/0.17-polish-and-trust/5-macos-smart-completions/plan.md Tasks 3–5

Test plan

  • cargo test -p gc-suggest brew (21/21 in providers_brew, 3/3 new brew goldens)
  • cargo test -p gc-suggest --test golden_specs brew
  • npm --prefix tools/fig-converter test (322/322 incl. new brew search routing tests)
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --check

StanMarek added 2 commits May 27, 2026 21:37
brew_formulae_searchable now consults ctx.current_token. Typed queries
call `brew search <q>` instead of empty search filtered by the cap; the
cap only applies to empty-query exploration.

Adds brew_casks_searchable and brew_packages_searchable providers for
the cask split: `brew search --cask <q>` and the union of formulae+casks
respectively. Includes parsers for both modern (`==> Casks`) and legacy
(`Casks:`) header styles emitted by Homebrew 2.x/4.x.
native-map: brew search now routes by flag — --cask|--casks to
brew_casks_searchable, --formula|--formulae to brew_formulae_searchable,
bare to brew_packages_searchable.

specs/brew.json: install/edit/home/abv args switch from
brew_formulae_searchable to brew_packages_searchable since these
subcommands accept both formulae and casks. Adds args to the search
subcommand with brew_packages_searchable.

applyBrewNativeProviderFixups maps `brew formulae` scripts to
brew_packages_searchable for consistency with the hand-edited spec so
re-running the converter is a no-op.
@StanMarek StanMarek changed the title feat(brew): query-aware search + cask split 0.17 Phase 5 PR B — feat(brew): query-aware search + cask split May 27, 2026
@StanMarek StanMarek force-pushed the feat/brew-query-aware-cask-split branch from a412d3b to 97c46c9 Compare May 27, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant