tessen

default description
git clone https://git.awy.one/tessen.git
Log | Files | Refs | README | LICENSE

commit a45d1a2f4ce4cdecd581feabba32e010b6427c3f
parent 81e2c3b92a99f4c5cc663592b75293f8efeedae5
Author: Ayush Agarwal <ayush@fastmail.in>
Date:   Tue, 21 Sep 2021 00:39:17 +0530

added bash completion

Diffstat:
Acompletion/tessen.bash-completion | 31+++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+), 0 deletions(-)

diff --git a/completion/tessen.bash-completion b/completion/tessen.bash-completion @@ -0,0 +1,31 @@ +_tessen() { + local cur prev + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD - 1]}" + all_long_opts="--backend --action --help --version " + all_short_opts="-b -a -h -v " + case "$prev" in + --backend | -b | --action | -a) + mapfile -t COMPREPLY < <(compgen -o bashdefault -o default -- "${cur}") + return 0 + ;; + *) + case "$cur" in + --*) + mapfile -t COMPREPLY < <(compgen -W "${all_long_opts}" -- "${cur}") + return 0 + ;; + -*) + mapfile -t COMPREPLY < <(compgen -W "${all_short_opts}" -- "${cur}") + return 0 + ;; + *) + mapfile -t COMPREPLY < <(compgen -o bashdefault -o default -- "${cur}") + return 0 + ;; + esac + ;; + esac +} +complete -F _tessen tessen