Problem
The shell completion scripts only complete static tokens (command names, flags, shell names, config subcommands). They cannot complete the values that matter most day to day: session aliases for dispatch open, or config keys for dispatch config get/set/unset. You still have to type or paste those by hand.
Proposed solution
Add a hidden dispatch __complete <what> command that prints newline-separated candidates for a given kind, then wire the four completion scripts to call it for the right argument positions. Kinds to support:
aliases reads the configured session aliases.
config-keys lists the settable config keys.
shells lists the supported completion shells.
Completion stays fast because each kind reads only local config or a static list. Unknown kinds print nothing and exit zero so a completer never breaks.
Acceptance criteria
dispatch open <TAB> completes configured session aliases in bash, zsh, fish, and PowerShell.
dispatch config get <TAB> (and set/unset) completes config keys.
dispatch completion <TAB> still completes the four shells, now sourced from __complete.
dispatch __complete <unknown> prints nothing and exits zero.
- The
__complete command is not advertised in help or usage.
- README notes that completion includes dynamic values and tests cover each kind and the unknown case.
Complexity
M
Priority
Medium
Problem
The shell completion scripts only complete static tokens (command names, flags, shell names, config subcommands). They cannot complete the values that matter most day to day: session aliases for
dispatch open, or config keys fordispatch config get/set/unset. You still have to type or paste those by hand.Proposed solution
Add a hidden
dispatch __complete <what>command that prints newline-separated candidates for a given kind, then wire the four completion scripts to call it for the right argument positions. Kinds to support:aliasesreads the configured session aliases.config-keyslists the settable config keys.shellslists the supported completion shells.Completion stays fast because each kind reads only local config or a static list. Unknown kinds print nothing and exit zero so a completer never breaks.
Acceptance criteria
dispatch open <TAB>completes configured session aliases in bash, zsh, fish, and PowerShell.dispatch config get <TAB>(andset/unset) completes config keys.dispatch completion <TAB>still completes the four shells, now sourced from__complete.dispatch __complete <unknown>prints nothing and exits zero.__completecommand is not advertised in help or usage.Complexity
M
Priority
Medium