From f10b6f6ee2bbf4d6d9356e27be25b25bdb85b9cd Mon Sep 17 00:00:00 2001 From: plexom Date: Fri, 1 Jul 2022 11:27:32 +0200 Subject: adds --vsplit and --hsplit arguments (#2773) * adds --vsplit and --hsplit arguments * moved comment * fixed lint (third time's a charm) * changed vsplit and hsplit from two separate bools to type Option, and some cleanup--- contrib/completion/hx.bash | 2 +- contrib/completion/hx.fish | 3 ++- contrib/completion/hx.zsh | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/completion/hx.bash b/contrib/completion/hx.bash index 6371bedb..87c34028 100644 --- a/contrib/completion/hx.bash +++ b/contrib/completion/hx.bash @@ -16,7 +16,7 @@ _hx() { COMPREPLY=($(compgen -W "$languages" -- $2)) ;; *) - COMPREPLY=($(compgen -fd -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar" -- $2)) + COMPREPLY=($(compgen -fd -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit" -- $2)) ;; esac } && complete -F _hx hx diff --git a/contrib/completion/hx.fish b/contrib/completion/hx.fish index 4ec690d8..df2fb500 100644 --- a/contrib/completion/hx.fish +++ b/contrib/completion/hx.fish @@ -9,4 +9,5 @@ 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" - +complete -c hx -l vsplit -d "Splits all given files vertically into different windows" +complete -c hx -l hsplit -d "Splits all given files horizontally into different windows" diff --git a/contrib/completion/hx.zsh b/contrib/completion/hx.zsh index 16631519..f9d58d3c 100644 --- a/contrib/completion/hx.zsh +++ b/contrib/completion/hx.zsh @@ -14,6 +14,8 @@ _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]" \ "*:file:_files" case "$state" in -- cgit v1.2.3-70-g09d2