mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
feat(completion): support termux-media-player command
This commit is contained in:
parent
0f1e330534
commit
8729f94fb3
1 changed files with 22 additions and 0 deletions
22
share/completions/termux-media-player.fish
Normal file
22
share/completions/termux-media-player.fish
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
set command termux-media-player
|
||||||
|
|
||||||
|
complete -c $command -f
|
||||||
|
|
||||||
|
complete -c $command \
|
||||||
|
-s h \
|
||||||
|
-d 'Show [h]elp'
|
||||||
|
|
||||||
|
set subcommands_with_descriptions 'info\t"Show a current playback information"' \
|
||||||
|
'play\t"Resume a playback if paused | Play a specific media file"' \
|
||||||
|
'pause\t"Pause a playback"' \
|
||||||
|
'stop\t"Quit a playback"'
|
||||||
|
|
||||||
|
set subcommands (string replace --regex '\\\t.+' '' -- $subcommands_with_descriptions)
|
||||||
|
|
||||||
|
complete -c $command \
|
||||||
|
-a "$subcommands_with_descriptions" \
|
||||||
|
-n "not __fish_seen_subcommand_from $subcommands"
|
||||||
|
|
||||||
|
complete -c $command \
|
||||||
|
-n "__fish_seen_subcommand_from play" \
|
||||||
|
-F
|
Loading…
Reference in a new issue