Open marchellodev opened 1 year ago
Autocomplete for commands can be implemented with clap_complete but I have questions:
Do we really need auto-complete for core commands like ser create
, ser start
or ser stop
? The commands are short, also some of them have the same starting characters (st in start / stop / status). This defeats the point of auto-complete.
There's value in auto-completion for service names. ser stop hel
gets auto-completed to ser stop hello-world
. The problem is that clap_help
won't help not help because we need to read files from /etc/systemd/system/
and match them with the input text. We must write completion scripts by hand and need separate scripts for every shell editor (bash, zsh).
Got a few things at hand but will try to make time for #2
. In the meantime contributions are appreciated
It would be great to have autocomplete when pressing tab to autocomplete for the command name or the service name for both zsh and bash.
For reference: https://askubuntu.com/questions/68175/how-to-create-script-with-auto-complete