You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Helix should ship with completion files for the hx command for the most widely used shells (bash, zsh, fish?). I already got it ready for fish and will do bash and zsh as well, but it should first be discussed which way to go:
premade files to install into vendor completions directory
no action required for user
pkg-config --variable completionsdir fish, don't know for bash/zsh as they're not known to pkg-config on macOS
a command line option to build completions for the specified shell
to be used like hx --generate-completion fish > ~/.config/fish/completions/hx.fish
could include --health language completion for user-added langs)
your better idea here ;)
The text was updated successfully, but these errors were encountered:
I would prefer the --generate-completion approach so anyone with custom language configuration can regenerate their completion to reflect what languages they have configured.
As the args are hardcoded (i.e. no argument parser lib) in helix_term#args() and #main_impl(), I think the straightforward approach to this would be to do the same: have static templates for each shell and just dynamically insert the languages.
Another way I just thought of would be to grab the languages out of hx --health in the completion script itself, something like this (fish):
set-l langs (hx --health|tail-n'+7'|awk'{print $1}'|sed's/\x1b\[[0-9;]*m//g')
complete-c hx -l health -x-a"$langs"-d"foo description"
That way no additional generation code is needed, keeping source clean.
Helix should ship with completion files for the
hx
command for the most widely used shells (bash, zsh, fish?). I already got it ready for fish and will do bash and zsh as well, but it should first be discussed which way to go:pkg-config --variable completionsdir fish
, don't know for bash/zsh as they're not known to pkg-config on macOShx --generate-completion fish > ~/.config/fish/completions/hx.fish
The text was updated successfully, but these errors were encountered: