From 361e6aa292c4662daa7b9a3086c35d38df424dcb Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Sun, 6 Oct 2024 03:08:11 +1000 Subject: [PATCH] fix(completion): variable assignments --- share/completions/termux-dialog.fish | 4 ++-- share/completions/termux-media-player.fish | 2 +- share/completions/termux-notification.fish | 9 ++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/share/completions/termux-dialog.fish b/share/completions/termux-dialog.fish index 340bff166..f6bb2a4be 100644 --- a/share/completions/termux-dialog.fish +++ b/share/completions/termux-dialog.fish @@ -7,7 +7,7 @@ complete -c $command -s h -d 'Show help' complete -c $command -s l -l list -d 'List all widgets and their options' complete -c $command -s t -l title -x -d 'Specify the title of a dialog' -set subcommands_with_descriptions 'confirm\t"Show a confirmation"' \ +set -l subcommands_with_descriptions 'confirm\t"Show a confirmation"' \ 'checkbox\t"Select multiple values using checkboxes"' \ 'counter\t"Pick a number in specific range"' \ 'date\t"Pick a date"' \ @@ -18,7 +18,7 @@ set subcommands_with_descriptions 'confirm\t"Show a confirmation"' \ 'text\t"Input text"' \ 'time\t"Pick a time value"' -set subcommands (string replace --regex '\\\t.+' '' -- $subcommands_with_descriptions) +set -l subcommands (string replace --regex '\\\t.+' '' -- $subcommands_with_descriptions) complete -c $command -a "$subcommands_with_descriptions" \ -n "not __fish_seen_subcommand_from $subcommands" diff --git a/share/completions/termux-media-player.fish b/share/completions/termux-media-player.fish index 9b66d6122..b88018b29 100644 --- a/share/completions/termux-media-player.fish +++ b/share/completions/termux-media-player.fish @@ -9,7 +9,7 @@ set subcommands_with_descriptions 'info\t"Show a current playback information"' 'pause\t"Pause a playback"' \ 'stop\t"Quit a playback"' -set subcommands (string replace --regex '\\\t.+' '' -- $subcommands_with_descriptions) +set -l subcommands (string replace --regex '\\\t.+' '' -- $subcommands_with_descriptions) complete -c $command -a "$subcommands_with_descriptions" \ -n "not __fish_seen_subcommand_from $subcommands" diff --git a/share/completions/termux-notification.fish b/share/completions/termux-notification.fish index 450a84167..5df0ab04c 100644 --- a/share/completions/termux-notification.fish +++ b/share/completions/termux-notification.fish @@ -10,8 +10,8 @@ complete -c $command -l action -F -r \ complete -c $command -l alert-once \ -d 'Do not alert when a notification is edited' -set button_names first second third -set index 1 +set -l button_names first second third +set -l index 1 while test $index -le (count $button_names) complete -c $command -l button$index -x \ @@ -43,7 +43,7 @@ complete -c $command -l led-color -x \ -a 'none\tdefault' \ -d 'Specify the LED color of a notification' -set led_states on off +set -l led_states on off for state in $led_states complete -c $command -l led-$state -x \ @@ -63,7 +63,6 @@ complete -c $command -l priority -x \ complete -c $command -l sound -d 'Play the sound with a notification' complete -c $command -s t -l title -x -d 'Specify the title of a notification' - complete -c $command -l vibrate -x \ -d 'Specify the vibrate pattern of a notification' @@ -71,7 +70,7 @@ complete -c $command -l type -x \ -a 'default\tdefault media' \ -d 'Specify the style of a notification' -set media_options next pause play previous +set -l media_options next pause play previous for option in $media_options complete -c $command -l media-$option -F -r \