You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FR: add a subcommand for generating completions #313
This issue is pretty stand alone, so it would be a good one to start with if someone wanted to take it on. Does not really require knowing anything about shpool's internals.
I haven't reviewed that patch super closely, but I think I noticed some use of unstable features, which makes me uncomfortable. shpool is maintained on a best-effort basis and I don't want to be in a position where the only options are dropping a feature and breaking backwards compatibility or re-implementing a now-deprecated or dropped feature that an upstream library decided to abandon. Maybe it's possible to use clap's completion support without relying on unstable features though.
Right, clap's dynamic completions are still unstable.
Dynamic means that the shell will run something like SHPOOL_COMPLETE=fish shpool -- $arg1 $arg2 to compute completions,
i.e. it more or less minimizes shell-specific code.
IIRC clap's static completions are stable and can generate completions for --someflag but I don't think they can complete session names.
But that can be provided with a little bit of shell-specific glue logic, so I don't see a blocker to using static completions for now.
I haven't worked on it yet because I wanted a more general solution clap-rs/clap#5784 .. but static completions would be a strict improvement, and we could even keep the interface stable when we move to dynamic ones later.
Activity
ethanpailes commentedon Feb 11, 2026
This issue is pretty stand alone, so it would be a good one to start with if someone wanted to take it on. Does not really require knowing anything about shpool's internals.
injust commentedon Feb 11, 2026
See fish-shell/fish-shell#12302 (comment) for a suggested patch (in the collapsible "Details" section).
ethanpailes commentedon Feb 11, 2026
I haven't reviewed that patch super closely, but I think I noticed some use of unstable features, which makes me uncomfortable. shpool is maintained on a best-effort basis and I don't want to be in a position where the only options are dropping a feature and breaking backwards compatibility or re-implementing a now-deprecated or dropped feature that an upstream library decided to abandon. Maybe it's possible to use clap's completion support without relying on unstable features though.
krobelus commentedon Feb 12, 2026
Right, clap's dynamic completions are still unstable.
Dynamic means that the shell will run something like
SHPOOL_COMPLETE=fish shpool -- $arg1 $arg2to compute completions,i.e. it more or less minimizes shell-specific code.
IIRC clap's static completions are stable and can generate completions for
--someflagbut I don't think they can complete session names.But that can be provided with a little bit of shell-specific glue logic, so I don't see a blocker to using static completions for now.
I haven't worked on it yet because I wanted a more general solution clap-rs/clap#5784 .. but static completions would be a strict improvement, and we could even keep the interface stable when we move to dynamic ones later.
ethanpailes commentedon Mar 2, 2026
Sounds like static completions for now and then dynamic completions once those are stable in clap is the way to go then.