mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-27 03:43:29 +04:00
130793dfd0
* Add command line parameter to specify log file I had the logs of my debug helix mixed in with the logs from the production helix. Add a `--log` command line argument to redirect any logs to other files, making my debugging easier :-) * Update completion files with `--log` argument
24 lines
573 B
Bash
24 lines
573 B
Bash
#!/usr/bin/env bash
|
|
# Bash completion script for Helix editor
|
|
|
|
_hx() {
|
|
# $1 command name
|
|
# $2 word being completed
|
|
# $3 word preceding
|
|
COMPREPLY=()
|
|
|
|
case "$3" in
|
|
-g | --grammar)
|
|
COMPREPLY=($(compgen -W "fetch build" -- $2))
|
|
;;
|
|
--health)
|
|
local languages=$(hx --health |tail -n '+7' |awk '{print $1}' |sed 's/\x1b\[[0-9;]*m//g')
|
|
COMPREPLY=($(compgen -W "$languages" -- $2))
|
|
;;
|
|
*)
|
|
COMPREPLY=($(compgen -fd -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config --log" -- $2))
|
|
;;
|
|
esac
|
|
} && complete -F _hx hx
|
|
|