carapace-bin
carapace-bin copied to clipboard
fish vs carapace in 2024
Request
I'm a fish user, and I'm new to caparace
I followed the step describe in https://carapace-sh.github.io/carapace-bin/setup.html
I was surprised to see
carapace --list | awk '{print $1}' | xargs -I{} touch ~/.config/fish/completions/{}.fish # disable auto-loaded completions (#185)
see
- #185
I can see the reference here https://github.com/carapace-sh/carapace-bin/blob/1b1ecb18cac516d0e68ec373da718e14faf9315f/docs/src/setup.md?plain=1#L32
I found the code was moved via 6ad36ab6bdaabcea04b7e2c2dd244c888063b0b0 and was initially added via 79e988ed8c311b63b2fa62ba36849dd25ae2bb68 (via #880)
All these are pretty old, the #185 was mentioning
- https://github.com/fish-shell/fish-shell/issues/6716
Is there any progress around this ?
I saw the status of fish-shell#6716 but I was curious if there is nothing else that evolved in the last few years. I find pretty painful to create empty file it's a strange logic
I found this https://github.com/cli/cli/issues/360#issuecomment-849593706
Proposed solution
I would have expected carapace to:
-
create the empty file via the go, not via an shell rule
-
the empty file could have a better content than simply being empty
they could contain comment about why the file is there and empty
-
use fish "complete -e" can't help ?
-
maybe the fish file could contain the complete command instead of being empty
for example
~/.config/fish/completions/git.fish could contain this
complete -e 'git'
complete -c 'git' -f -a '(_carapace_lazy git)'
Anything else?
I might be wrong about the things I'm asking or the point I'm raising, but I would like to know if we couldn't do something better for the fish integration
Thanks