From 8729f94fb3521885123c5c2db87ab19f91209322 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Sun, 15 Sep 2024 09:01:46 +1000 Subject: [PATCH] feat(completion): support termux-media-player command --- share/completions/termux-media-player.fish | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 share/completions/termux-media-player.fish diff --git a/share/completions/termux-media-player.fish b/share/completions/termux-media-player.fish new file mode 100644 index 000000000..c97bffbc7 --- /dev/null +++ b/share/completions/termux-media-player.fish @@ -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