espanso / espanso

Cross-platform Text Expander written in Rust
https://espanso.org
GNU General Public License v3.0
10.14k stars 280 forks source link

Add bash / zsh / fish shell completion for subcommands and flags #2115

Open j-lakeman opened 1 month ago

j-lakeman commented 1 month ago

Description

Would be cool if subcommands like status and flags like --help could be autocompleted upon pressing TAB. This would increase the ease of use of this already great application lots IMHO.

Motivation

productivity / ease of use

Alternatives

keep using --help and manually typing subcommands and flags

Have you tried building it? Or would you like it?

smeech commented 1 month ago

I agree, the Espanso commands could be much easier to use, which is why I wrote this, producing this output and eventually documented them here, to index them and make them easier to find.

Shell autocompletion is, I suspect, outside the scope of Espanso development, I fear. However, following your suggestion, a little research suggests adding it would be a fairly straightforward, if time-consuming, task, especially as each shell needs different settings.

Whether Espanso commands are used enough to be worth the effort is debatable. :neutral_face:

werdahias commented 4 weeks ago

the autocompletions can be generated automatically by clap-complete

AucaCoyan commented 3 weeks ago

Yes! this is a missing feature I want to deliver anytime. Sadly I couldn't find the time, and only did the completions for my shell (nushell). But you are right! completions can be automated with clap.