mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Update ZSH completions (#11120)
This commit is contained in:
parent
649bd4501e
commit
9d75385062
@ -1,4 +1,4 @@
|
||||
#compdef _hx hx
|
||||
compdef _hx hx
|
||||
# Zsh completion script for Helix editor
|
||||
|
||||
_hx() {
|
||||
@ -14,16 +14,18 @@ _hx() {
|
||||
"--health[Checks for errors in editor setup]:language:->health" \
|
||||
"-g[Fetches or builds tree-sitter grammars]:action:->grammar" \
|
||||
"--grammar[Fetches or builds tree-sitter grammars]:action:->grammar" \
|
||||
"--vsplit[Splits all given files vertically into different windows]" \
|
||||
"--hsplit[Splits all given files horizontally into different windows]" \
|
||||
"--vsplit[Splits all given files vertically]" \
|
||||
"--hsplit[Splits all given files horizontally]" \
|
||||
"-c[Specifies a file to use for configuration]" \
|
||||
"--config[Specifies a file to use for configuration]" \
|
||||
"--log[Specifies a file to write log data into]" \
|
||||
"-w[Specify initial working directory]" \
|
||||
"--working-dir[Specify initial working directory]" \
|
||||
"--log[Specifies a file to use for logging]" \
|
||||
"*:file:_files"
|
||||
|
||||
case "$state" in
|
||||
health)
|
||||
local languages=($(hx --health |tail -n '+7' |awk '{print $1}' |sed 's/\x1b\[[0-9;]*m//g'))
|
||||
local languages=($(hx --health | tail -n '+11' | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g;s/[✘✓]//g'))
|
||||
_values 'language' $languages
|
||||
;;
|
||||
grammar)
|
||||
|
Loading…
Reference in New Issue
Block a user