Skip to content

Commit

Permalink
chore(completion): add scheme autocompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
henry-hsieh authored and JamyGolden committed Apr 29, 2024
1 parent 55d21ec commit 1991e10
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions contrib/completion/tinty.bash
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ _tinty() {
return 0
;;
tinty__apply)
opts="-c -d -h --config --data-dir --help <scheme_name>"
opts="-c -d -h --config --data-dir --help $($1 list)"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand All @@ -123,6 +123,10 @@ _tinty() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
base*)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
Expand Down Expand Up @@ -287,7 +291,7 @@ _tinty() {
return 0
;;
tinty__info)
opts="-c -d -h --config --data-dir --help [scheme_name]"
opts="-c -d -h --config --data-dir --help $($1 list)"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand All @@ -309,6 +313,10 @@ _tinty() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
base*)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
Expand Down

0 comments on commit 1991e10

Please sign in to comment.