aboutsummaryrefslogtreecommitdiff
path: root/contrib/completion/hx.fish
diff options
context:
space:
mode:
authorBenedikt Müller2022-04-12 08:10:21 +0000
committerGitHub2022-04-12 08:10:21 +0000
commit1fb614443292fe723e764782be560bb2ab3dda4e (patch)
tree60f7e42042637a923798dd6528de425409190c45 /contrib/completion/hx.fish
parent660e0e44b2b6329c1d0af788d624dd5765c2acc6 (diff)
Add shell completion (#2022)
* Add shell completion * Add shell completion to release
Diffstat (limited to 'contrib/completion/hx.fish')
-rw-r--r--contrib/completion/hx.fish12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/completion/hx.fish b/contrib/completion/hx.fish
new file mode 100644
index 00000000..4ec690d8
--- /dev/null
+++ b/contrib/completion/hx.fish
@@ -0,0 +1,12 @@
+#!/usr/bin/env fish
+# Fish completion script for Helix editor
+
+set -l langs (hx --health |tail -n '+7' |awk '{print $1}' |sed 's/\x1b\[[0-9;]*m//g')
+
+complete -c hx -s h -l help -d "Prints help information"
+complete -c hx -l tutor -d "Loads the tutorial"
+complete -c hx -l health -x -a "$langs" -d "Checks for errors in editor setup"
+complete -c hx -s g -l grammar -x -a "fetch build" -d "Fetches or builds tree-sitter grammars"
+complete -c hx -s v -o vv -o vvv -d "Increases logging verbosity"
+complete -c hx -s V -l version -d "Prints version information"
+