fork/helix
git clone https://git.julia.blue/fork/helix
130793df
23.10
1#compdef _hx hx 2# Zsh completion script for Helix editor 3 4_hx () { 5_arguments -C \ 6"-h[Prints help information]" \ 7"--help[Prints help information]" \ 8"-v[Increase logging verbosity]" \ 9"-vv[Increase logging verbosity]" \ 10"-vvv[Increase logging verbosity]" \ 11"-V[Prints version information]" \ 12"--version[Prints version information]" \ 13"--tutor[Loads the tutorial]" \ 14"--health[Checks for errors in editor setup]:language:->health" \ 15"-g[Fetches or builds tree-sitter grammars]:action:->grammar" \ 16"--grammar[Fetches or builds tree-sitter grammars]:action:->grammar" \ 17"--vsplit[Splits all given files vertically into different windows]" \ 18"--hsplit[Splits all given files horizontally into different windows]" \ 19"-c[Specifies a file to use for configuration]" \ 20"--config[Specifies a file to use for configuration]" \ 21"--log[Specifies a file to write log data into]" \ 22"*:file:_files" 23 24case "$state" in 25health) 26local languages=( $( hx --health | tail -n '+7' | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g' ) ) 27 _values 'language' $languages 28 ;; 29 grammar) 30 _values 'action' fetch build 31 ;; 32 esac 33} 34