fork/helix

git clone https://git.julia.blue/fork/helix

Yuntao Zhaofeat: improve hx fish completion (#10853)86982ab3

25.07.1
947 B18 linesraw
1#!/usr/bin/env fish
2# Fish completion script for Helix editor
3
4complete -c hx -s h -l help -d "Prints help information"
5complete -c hx -l tutor -d "Loads the tutorial"
6complete -c hx -l health -xa "(__hx_langs_ops)" -d "Checks for errors"
7complete -c hx -s g -l grammar -x -a "fetch build" -d "Fetch or build tree-sitter grammars"
8complete -c hx -s v -o vv -o vvv -d "Increases logging verbosity"
9complete -c hx -s V -l version -d "Prints version information"
10complete -c hx -l vsplit -d "Splits all given files vertically"
11complete -c hx -l hsplit -d "Splits all given files horizontally"
12complete -c hx -s c -l config -r -d "Specifies a file to use for config"
13complete -c hx -l log -r -d "Specifies a file to use for logging"
14complete -c hx -s w -l working-dir -d "Specify initial working directory" -xa "(__fish_complete_directories)"
15
16function __hx_langs_ops
17    hx --health languages | tail -n '+2' | string replace -fr '^(\S+) .*' '$1'
18end