feat(completion): support termux-toast command

This commit is contained in:
EmilyGraceSeville7cf 2024-09-17 01:25:47 +10:00
parent 45efb05a67
commit 4606153aa7
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,29 @@
set command termux-toast
complete -c $command -f
complete -c $command \
-s h \
-d 'Show [h]elp'
complete -c $command \
-a '(__fish_termux_api__complete_colors)' \
-s b \
-d 'Specify the [b]ackground color of a message' \
-x
complete -c $command \
-a '(__fish_termux_api__complete_colors)' \
-s c \
-d 'Specify the text [c]olor of a message' \
-x
complete -c $command \
-a 'middle\tdefault top bottom' \
-s g \
-d 'Specify the position of a message' \
-x
complete -c $command \
-s s \
-d 'Show a message for the [s]hort period of time'

View file

@ -0,0 +1,3 @@
function __fish_termux_api__complete_colors
set_color --print-colors | string match --invert --regex '^(br.*|normal)$'
end