[idea] Add ZSH Completion #435
Replies: 4 comments 1 reply
-
|
Just mentioning it because https://github.com/asheshgoplani/agent-deck also has this as well <3 |
Beta Was this translation helpful? Give feedback.
-
|
For anyone instered I have a working solution for this, I write my own completions with the usage spec from mise since they are really hard to write on my own This is the usage spec https://usage.jdx.dev/spec/reference/ This is the usage spec for herdr that I use on my own dotfiles https://github.com/ggallovalle/dots/blob/main/home/dot_config/zsh/usage/herdr.kdl And this is how you generate them # just make sure that file is on zsh fpath
usage generate completion zsh "herdr" -f "<path to the usage file>" > _herdrIt completes dynamic arguments and all, see $DOTFILES
❯ herdr session attach dots[tab]
default -- default is stopped (default)
dots -- dots is running
kbarr -- kbarr is stopped
kbmedia -- kbmedia is stopped
kbstd -- kbstd is stopped
p.kbstd -- p.kbstd is running
thinker -- thinker is stopped
$DOTFILES
❯ herdr pane close w6521ff921a4101-
w6521ff921a4101-1 -- w6521ff921a4101-1 is unknown
w6521ff921a4101-2 -- w6521ff921a4101-2 is unknown
w6521ff921a4101-3 -- w6521ff921a4101-3 is unknownI have a skill to generate it and keep it uptodate, I did not handrite anything at all |
Beta Was this translation helpful? Give feedback.
-
|
maybe we could use clap to reimplement the command line args parser (currently it manually parse strings) and then auto generate a completion script. |
Beta Was this translation helpful? Give feedback.
-
|
moved to issue tracking phase |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
idea / problem
It would be great for
herdrto support zsh shell completions in addition to its existing terminal-focused UX.Motivation
Since
herdris a terminal-native tool, shell completion would make common workflows faster and more discoverable. Zsh completion in particular would help users:This feels especially valuable for a tool aimed at AI coding workflows, where fast iteration in-terminal matters.
requested change
Proposed behavior
Add first-class support for generating or installing zsh completions for the
herdrCLI.Possible approaches:
herdr completions zshherdr completion zshIf the CLI already uses a framework that can emit shell completions, this may be relatively straightforward to add.
Expected completion scope
Ideally completions would cover:
If practical, it would also be nice to support completion for any aliases.
Docs
If implemented, it would help to add unreleased docs in the preview docs area describing:
why you want this
This seems aligned with
herdr’s terminal-first workflow and should improve usability without changing core behavior.Beta Was this translation helpful? Give feedback.
All reactions