Open meator opened 11 hours ago
I don't have extensive knowledge of Bash's, Fish's and ZSH's completion scripts (although I know a bit about ZSH's), but I'd be willing to contribute/collaborate if there is interest. If you find these features worthwhile to implement, I'll probably leave it up to you (because I assume that your knowledge of this matter is greater than mine @braph), but I'd be willing to contribute otherwise. I can also test the changes on j4-dmenu-desktop.
I'm happy to inform you that mutually exclusive options are already supported by crazy-complete
! You can achieve this by using the group
field, which is part of the option
dictionary. For each mutually exclusive option, simply assign the same group
value, and the program will ensure that these options cannot be used together. You can have a look at https://github.com/crazy-complete/crazy-complete/blob/main/completions/pylint/pylint.yaml to see a real life example.
Hey, I am a maintainer of j4-dmenu-desktop and I have been seriously considering switching to your project for providing completions. I must say that your project is awesome and has exceeded my expectations. It's nice to see that
command
is available as a completion variant. Your YAML format is much nicer to work with than competition's.I would like to request mutaly exclusive options. j4-dmenu-desktop will have two new flags in its upcoming release:
--desktop-file-quirks
and--strict-parsing
. These two flags cannot be specified together.j4-dmenu-desktop already has hand written completion scripts for Bash, Fish and ZSH. This is how it's handled in ZSH right now:
This is how it's handled in Fish right now:
The Fish completion is a bit more janky, it depends on undocumented and therefore unstable builtin completion functions. I am talking about the
__fish_contains_opt
and__fish_complete_list
. I have copied the function definitions from Fish's latest release into my completion script to maintain stability.This is the approach I was recommended by the official Fish Matrix channel.
I haven't implemented mutal exclusivity in Bash.