diff --git a/share/completions/termux-call-log.fish b/share/completions/termux-call-log.fish index 0022d5108..d4c0a7f12 100644 --- a/share/completions/termux-call-log.fish +++ b/share/completions/termux-call-log.fish @@ -1,19 +1,13 @@ -set command termux-call-log +set -l command termux-call-log complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ +complete -c $command -s l -x \ -a '10\tdefault' \ - -s l \ - -d 'Limit the amount of listed calls' \ - -x + -d 'Limit the amount of listed calls' -complete -c $command \ +complete -c $command -s o -x \ -a '0\tdefault' \ - -s o \ - -d 'Start listing calls with the specified one' \ - -x + -d 'Start listing calls with the specified one' diff --git a/share/completions/termux-camera-photo.fish b/share/completions/termux-camera-photo.fish index 2620b4e31..10d7b4439 100644 --- a/share/completions/termux-camera-photo.fish +++ b/share/completions/termux-camera-photo.fish @@ -1,13 +1,9 @@ -set command termux-camera-photo +set -l command termux-camera-photo complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ +complete -c $command -s c -x \ -a '(__fish_termux_api__complete_camera_ids)' \ - -s c \ - -d 'Specify the ID of a camera' \ - -x + -d 'Specify the ID of a camera' diff --git a/share/completions/termux-dialog.fish b/share/completions/termux-dialog.fish index 8208cad88..a6968daa5 100644 --- a/share/completions/termux-dialog.fish +++ b/share/completions/termux-dialog.fish @@ -1,21 +1,11 @@ -set command termux-dialog +set -l command termux-dialog complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +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 \ - -d 'Specify the title of a dialog' \ - -x +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"' \ 'checkbox\t"Select multiple values using checkboxes"' \ @@ -30,48 +20,36 @@ set subcommands_with_descriptions 'confirm\t"Show a confirmation"' \ 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 -a "$subcommands_with_descriptions" \ + -n "not __fish_seen_subcommand_from $subcommands" -complete -c $command \ - -s i \ +complete -c $command -s i -x \ -d "Specify the text hint of a dialog" \ - -n "__fish_seen_subcommand_from confirm speech text" \ - -x + -n "__fish_seen_subcommand_from confirm speech text" -complete -c $command \ - -s v \ +complete -c $command -s v -x \ -d "Specify the comma delimited choices of a dialog" \ - -n "__fish_seen_subcommand_from checkbox radio sheet spinner" \ - -x + -n "__fish_seen_subcommand_from checkbox radio sheet spinner" -complete -c $command \ - -s r \ +complete -c $command -s r -x \ -d "Specify the number range of a dialog" \ - -n "__fish_seen_subcommand_from counter" \ - -x + -n "__fish_seen_subcommand_from counter" -complete -c $command \ +complete -c $command -s d -x \ -a '"dd-MM-yyyy k:m:s"\tdefault' \ - -s d \ -d "Specify the date format of a dialog" \ - -n "__fish_seen_subcommand_from date" \ - -x + -n "__fish_seen_subcommand_from date" set text_condition "__fish_seen_subcommand_from text" -complete -c $command \ - -s m \ +complete -c $command -s m \ -d "Enable the multiline input mode in a dialog" \ -n "$text_condition; and not __fish_seen_argument -s n" -complete -c $command \ - -s n \ +complete -c $command -s n \ -d "Enable the number input mode in a dialog" \ -n "$text_condition; and not __fish_seen_argument -s m" -complete -c $command \ - -s p \ +complete -c $command -s p \ -d "Enable the password input mode in a dialog" \ -n $text_condition diff --git a/share/completions/termux-download.fish b/share/completions/termux-download.fish index 7200cebb6..ec040ca19 100644 --- a/share/completions/termux-download.fish +++ b/share/completions/termux-download.fish @@ -1,22 +1,11 @@ -set command termux-download +set -l command termux-download complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -s d \ - -d 'Specify the description for a download notification' \ - -x +complete -c $command -s d -x \ + -d 'Specify the description for a download notification' -complete -c $command \ - -s t \ - -d 'Specify the title for a download notification' \ - -x - -complete -c $command \ - -s p \ - -d 'Specify the path for a download' \ - -F -r +complete -c $command -s t -x -d 'Specify the title for a download notification' +complete -c $command -s p -F -r -d 'Specify the path for a download' diff --git a/share/completions/termux-infrared-transmit.fish b/share/completions/termux-infrared-transmit.fish index 48a20a72e..4c3f09af0 100644 --- a/share/completions/termux-infrared-transmit.fish +++ b/share/completions/termux-infrared-transmit.fish @@ -1,12 +1,7 @@ -set command termux-infrared-transmit +set -l command termux-infrared-transmit complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -s f \ - -d 'Specify the IR carrier frequency' \ - -x +complete -c $command -s f -x -d 'Specify the IR carrier frequency' diff --git a/share/completions/termux-job-scheduler.fish b/share/completions/termux-job-scheduler.fish index 86b9fe2e4..2dff3a33b 100644 --- a/share/completions/termux-job-scheduler.fish +++ b/share/completions/termux-job-scheduler.fish @@ -1,72 +1,37 @@ -set command termux-job-scheduler +set -l command termux-job-scheduler complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -s p \ - -l pending \ - -d 'List pending jobs' +complete -c $command -s p -l pending -d 'List pending jobs' +complete -c $command -l cancel-all -d 'Cancel all pending jobs' +complete -c $command -s s -l script -r -d 'Specify a script path to schedule' +complete -c $command -l job-id -x -d 'Specify the ID of a job' -complete -c $command \ - -l cancel-all \ - -d 'Cancel all pending jobs' - -complete -c $command \ - -s s \ - -l script \ - -d 'Specify a script path to schedule' \ - -r - -complete -c $command \ - -l job-id \ - -d 'Specify the ID of a job' \ - -x - -complete -c $command \ +complete -c $command -l period-ms -x \ -a '0\tdefault' \ - -l period-ms \ - -d 'Specify the interval between script runs' \ - -x + -d 'Specify the interval between script runs' -complete -c $command \ +complete -c $command -l network -x \ -a 'any\tdefault unmetered cellular not_roaming none' \ - -l network \ - -d 'Require the network of a specific type to be available' \ - -x + -d 'Require the network of a specific type to be available' -complete -c $command \ +complete -c $command -l battery-not-low -x \ -a 'true\tdefault false' \ - -l battery-not-low \ - -d 'Whether run a script when a battery is low' \ - -x + -d 'Whether run a script when a battery is low' -complete -c $command \ +complete -c $command -l storage-not-low -x \ -a 'false\tdefault true' \ - -l storage-not-low \ - -d 'Whether run a script when a storage is low' \ - -x + -d 'Whether run a script when a storage is low' -complete -c $command \ +complete -c $command -l charging -x \ -a 'false\tdefault true' \ - -l charging \ - -d 'Whether run a script when the device is charging' \ - -x + -d 'Whether run a script when the device is charging' -complete -c $command \ +complete -c $command -l persisted -x \ -a 'false\tdefault true' \ - -l persisted \ - -d 'Whether unschedule script on reboots' \ - -x + -d 'Whether unschedule script on reboots' -complete -c $command \ - -l trigger-content-uri \ - -x - -complete -c $command \ - -a '1\tdefault' \ - -l trigger-content-flag \ - -x +complete -c $command -l trigger-content-uri -x +complete -c $command -l trigger-content-flag -x -a '1\tdefault' diff --git a/share/completions/termux-location.fish b/share/completions/termux-location.fish index 25fcc923d..7bc366ab9 100644 --- a/share/completions/termux-location.fish +++ b/share/completions/termux-location.fish @@ -1,19 +1,13 @@ -set command termux-location +set -l command termux-location complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ +complete -c $command -s p -x \ -a 'gps\tdefault network passive' \ - -s p \ - -d 'Specify the provider of a location' \ - -x + -d 'Specify the provider of a location' -complete -c $command \ +complete -c $command -s r -x \ -a 'once\tdefault last updates' \ - -s r \ - -d 'Specify the request type for a location' \ - -x + -d 'Specify the request type for a location' diff --git a/share/completions/termux-media-player.fish b/share/completions/termux-media-player.fish index 21ca03be4..9b66d6122 100644 --- a/share/completions/termux-media-player.fish +++ b/share/completions/termux-media-player.fish @@ -1,10 +1,8 @@ -set command termux-media-player +set -l command termux-media-player complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' set subcommands_with_descriptions 'info\t"Show a current playback information"' \ 'play\t"Resume a playback if paused | Play a specific media file"' \ @@ -13,10 +11,8 @@ set subcommands_with_descriptions 'info\t"Show a current playback information"' set subcommands (string replace --regex '\\\t.+' '' -- $subcommands_with_descriptions) -complete -c $command \ - -a "$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 -r +complete -c $command -F -r \ + -n "__fish_seen_subcommand_from play" diff --git a/share/completions/termux-media-scan.fish b/share/completions/termux-media-scan.fish index 38f814558..29e34cb08 100644 --- a/share/completions/termux-media-scan.fish +++ b/share/completions/termux-media-scan.fish @@ -1,13 +1,6 @@ -set command termux-media-scan +set -l command termux-media-scan -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -s r \ - -d 'Scan directories recursively' - -complete -c $command \ - -s v \ - -d 'Show verbose messages' +complete -c $command -s r -d 'Scan directories recursively' +complete -c $command -s v -d 'Show verbose messages' diff --git a/share/completions/termux-microphone-record.fish b/share/completions/termux-microphone-record.fish index ca314afb9..38a653896 100644 --- a/share/completions/termux-microphone-record.fish +++ b/share/completions/termux-microphone-record.fish @@ -1,51 +1,22 @@ -set command termux-microphone-record +set -l command termux-microphone-record complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -s d \ - -d Record +complete -c $command -s d -d Record +complete -c $command -s f -F -r -d 'Specify a file to save recording to' -complete -c $command \ - -s f \ - -d 'Specify a file to save recording to' \ - -F -r - -complete -c $command \ +complete -c $command -s l -x \ -a '0\tdefault' \ - -s l \ - -d 'Specify the length limit of a recording' \ - -x + -d 'Specify the length limit of a recording' -complete -c $command \ +complete -c $command -s e -x \ -a 'aac amr_wb amr_nb' \ - -s e \ - -d 'Specify the encoder of a recording' \ - -x + -d 'Specify the encoder of a recording' -complete -c $command \ - -s b \ - -d 'Specify the bitrate of a recording' \ - -x - -complete -c $command \ - -s r \ - -d 'Specify the sampling rate of a recording' \ - -x - -complete -c $command \ - -s c \ - -d 'Specify the channel count of a recording' \ - -x - -complete -c $command \ - -s i \ - -d 'Show information about the current recording' - -complete -c $command \ - -s q \ - -d 'Quit the current recording' +complete -c $command -s b -x -d 'Specify the bitrate of a recording' +complete -c $command -s r -x -d 'Specify the sampling rate of a recording' +complete -c $command -s c -x -d 'Specify the channel count of a recording' +complete -c $command -s i -d 'Show information about the current recording' +complete -c $command -s q -d 'Quit the current recording' diff --git a/share/completions/termux-notification-remove.fish b/share/completions/termux-notification-remove.fish index 9c0e7dd54..786d46cc9 100644 --- a/share/completions/termux-notification-remove.fish +++ b/share/completions/termux-notification-remove.fish @@ -1,12 +1,7 @@ -set command termux-notification-remove +set -l command termux-notification-remove complete -c $command -f -complete -c $command \ - -s h \ - -l help \ - -d 'Show help' +complete -c $command -s h -l help -d 'Show help' -complete -c $command \ - -a '(__fish_termux_api__complete_group_ids)' \ - -x +complete -c $command -a '(__fish_termux_api__complete_group_ids)' -x diff --git a/share/completions/termux-notification.fish b/share/completions/termux-notification.fish index 0df1d9ddc..f02318096 100644 --- a/share/completions/termux-notification.fish +++ b/share/completions/termux-notification.fish @@ -1,123 +1,80 @@ -set command termux-notification +set -l command termux-notification complete -c $command -f -complete -c $command \ - -s h \ - -l help \ - -d 'Show help' +complete -c $command -s h -l help -d 'Show help' -complete -c $command \ - -l action \ - -d 'Specify the action when pressing a notification' \ - -F -r +complete -c $command -l action -F -r \ + -d 'Specify the action when pressing a notification' -complete -c $command \ - -l alert-once \ +complete -c $command -l alert-once \ -d 'Do not alert when a notification is edited' set button_names first second third set index 1 while test $index -le (count $button_names) - complete -c $command \ - -l button$index \ - -d "Specify the text of a $button_names[$index] notification button" \ - -x + complete -c $command -l button$index -x \ + -d "Specify the text of a $button_names[$index] notification button" - complete -c $command \ - -l button$index-action \ - -d "Specify the action of a $button_names[$index] notification button" \ - -F -r + complete -c $command -l button$index-action -F -r \ + -d "Specify the action of a $button_names[$index] notification button" set index (math $index + 1) end -complete -c $command \ - -s c \ - -l content \ - -d 'Specify the content of a notification' \ - -x +complete -c $command -s c -l content -x \ + -d 'Specify the content of a notification' -complete -c $command \ +complete -c $command -l group -x \ -a '(__fish_termux_api__complete_group_ids)' \ - -l group \ - -d 'Specify the group of a notification' \ - -x + -d 'Specify the group of a notification' -complete -c $command \ - -l help-actions \ +complete -c $command -l help-actions \ -d 'Show help for the actions of a notification' -complete -c $command \ - -s i \ - -l id \ - -d 'Specify the identifier of a notification' \ - -x +complete -c $command -s i -l id -x \ + -d 'Specify the identifier of a notification' -complete -c $command \ - -l image-path \ - -d 'Specify the image of a notification' \ - -F -r +complete -c $command -l image-path -F -r \ + -d 'Specify the image of a notification' -complete -c $command \ +complete -c $command -l led-color -x \ -a 'none\tdefault' \ - -l led-color \ - -d 'Specify the LED color of a notification' \ - -x + -d 'Specify the LED color of a notification' set led_states on off for state in $led_states - complete -c $command \ + complete -c $command -l led-$state -x \ -a '800\tdefault' \ - -l led-$state \ - -d "Specify the time for the LED to be $state while flashing of a notification" \ - -x + -d "Specify the time for the LED to be $state while flashing of a notification" end -complete -c $command \ - -l on-delete \ - -d 'Specify the action when a notification is cleared' \ - -F -r +complete -c $command -l on-delete -F -r \ + -d 'Specify the action when a notification is cleared' -complete -c $command \ - -l ongoing \ - -d 'Pin a notification' +complete -c $command -l ongoing -d 'Pin a notification' -complete -c $command \ +complete -c $command -l priority -x \ -a 'default\tdefault high low max min' \ - -l priority \ - -d 'Specify the priority of a notification' \ - -x + -d 'Specify the priority of a notification' -complete -c $command \ - -l sound \ - -d 'Play the sound with a notification' +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 \ - -s t \ - -l title \ - -d 'Specify the title of a notification' \ - -x +complete -c $command -l vibrate -x \ + -d 'Specify the vibrate pattern of a notification' -complete -c $command \ - -l vibrate \ - -d 'Specify the vibrate pattern of a notification' \ - -x - -complete -c $command \ +complete -c $command -l type -x \ -a 'default\tdefault media' \ - -l type \ - -d 'Specify the style of a notification' \ - -x + -d 'Specify the style of a notification' set media_options next pause play previous for option in $media_options - complete -c $command \ - -l media-$option \ + complete -c $command -l media-$option -F -r \ -d "Specify the action for $option button a notification" \ - -n '__fish_seen_argument -l type' \ - -F -r + -n '__fish_seen_argument -l type' end diff --git a/share/completions/termux-sensor.fish b/share/completions/termux-sensor.fish index f17ecadb6..85f7ec277 100644 --- a/share/completions/termux-sensor.fish +++ b/share/completions/termux-sensor.fish @@ -1,61 +1,20 @@ -function __fish_termux_api__complete_sensor_ids_as_list - set ids (__fish_termux_api__complete_sensor_ids) - set token (commandline -t -c) - - set delimiter , - - switch "$token" - case '*,' - set delimiter - end - - test -z "$token" && set delimiter - - for id in $ids - string unescape -- "$token$delimiter$id" - end -end - -set command termux-sensor +set -l command termux-sensor complete -c $command -f -complete -c $command \ - -s h \ - -l help \ - -d 'Show help' +complete -c $command -s h -l help -d 'Show help' -complete -c $command \ - -s a \ - -l all \ - -d 'Listen to all sensors' +complete -c $command -s a -l all -d 'Listen to all sensors' +complete -c $command -s c -l cleanup -d 'Release sensor resources' +complete -c $command -s l -l list -d 'List sensors' -complete -c $command \ - -s c \ - -l cleanup \ - -d 'Release sensor resources' +complete -c $command -s s -l sensors -x \ + -a '(__fish_complete_list , __fish_termux_api__complete_sensor_ids)' \ + -d 'Specify comma-separated sensors to listen to' -complete -c $command \ - -s l \ - -l list \ - -d 'List sensors' +complete -c $command -s d -l delay -x \ + -d 'Specify the delay between sensor updates' -complete -c $command \ - -a '(__fish_termux_api__complete_sensor_ids_as_list)' \ - -s s \ - -l sensors \ - -d 'Specify comma-separated sensors to listen to' \ - -x - -complete -c $command \ - -s d \ - -l delay \ - -d 'Specify the delay between sensor updates' \ - -x - -complete -c $command \ +complete -c $command -s n -l limit -x \ -a 'continuous\tdefault' \ - -s n \ - -l limit \ - -d 'Specify a number of times to read senors' \ - -x + -d 'Specify a number of times to read senors' diff --git a/share/completions/termux-share.fish b/share/completions/termux-share.fish index 533b63edf..8cd04df76 100644 --- a/share/completions/termux-share.fish +++ b/share/completions/termux-share.fish @@ -1,28 +1,17 @@ -set command termux-share +set -l command termux-share complete -c $command -f -complete -c $command \ - -s h \ - -l help \ - -d 'Show help' +complete -c $command -s h -l help -d 'Show help' -complete -c $command \ +complete -c $command -s a -x \ -a 'view\tdefault edit send' \ - -s a \ - -d 'Specify the action to perform on a content' \ - -x + -d 'Specify the action to perform on a content' -complete -c $command \ +complete -c $command -s c \ -a 'text/plain\tdefault' \ - -s c \ -d 'Specify the type of a content' -complete -c $command \ - -s d \ - -d 'Specify the receiver of a content' - -complete -c $command \ - -s t \ - -d 'Specify the title of a content' \ - -x +complete -c $command -s d -d 'Specify the receiver of a content' +complete -c $command -s t -x -d 'Specify the title of a content' + diff --git a/share/completions/termux-sms-list.fish b/share/completions/termux-sms-list.fish index 67db0c6ec..6d683f6c8 100644 --- a/share/completions/termux-sms-list.fish +++ b/share/completions/termux-sms-list.fish @@ -1,33 +1,21 @@ -set command termux-sms-list +set -l command termux-sms-list complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -s d \ - -d 'Show the creation dates of listed messages' +complete -c $command -s d -d 'Show the creation dates of listed messages' -complete -c $command \ +complete -c $command -s l -x \ -a '10\tdefault' \ - -s l \ - -d 'Limit the amount of listed messages' \ - -x + -d 'Limit the amount of listed messages' -complete -c $command \ - -s n \ - -d 'Show the phone numbers of listed messages' +complete -c $command -s n -d 'Show the phone numbers of listed messages' -complete -c $command \ +complete -c $command -s o -x \ -a '0\tdefault' \ - -s o \ - -d 'Start listing calls with the specificed one' \ - -x + -d 'Start listing calls with the specificed one' -complete -c $command \ +complete -c $command -s t -x \ -a 'inbox\tdefault all sent draft outbox' \ - -s t \ - -d 'Filter listed messages by the type' \ - -x + -d 'Filter listed messages by the type' diff --git a/share/completions/termux-sms-send.fish b/share/completions/termux-sms-send.fish index b3a84839e..33aed7394 100644 --- a/share/completions/termux-sms-send.fish +++ b/share/completions/termux-sms-send.fish @@ -1,18 +1,11 @@ -set command termux-sms-list +set -l command termux-sms-list complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ +complete -c $command -s n -x \ -a '(__fish_complete_list , __fish_termux_api__complete_phone_numbers)' \ - -s n \ - -d 'Specify the recipient numbers of a message' \ - -x + -d 'Specify the recipient numbers of a message' -complete -c $command \ - -s s \ - -d 'Specify the sim slot to use for a message' \ - -x +complete -c $command -s s -x -d 'Specify the sim slot to use for a message' diff --git a/share/completions/termux-telephony-call.fish b/share/completions/termux-telephony-call.fish index 78033590b..d5053ac3c 100644 --- a/share/completions/termux-telephony-call.fish +++ b/share/completions/termux-telephony-call.fish @@ -1,10 +1,7 @@ -set command termux-telephony-call +set -l command termux-telephony-call complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -a '(__fish_termux_api__complete_phone_numbers)' +complete -c $command -a '(__fish_termux_api__complete_phone_numbers)' diff --git a/share/completions/termux-toast.fish b/share/completions/termux-toast.fish index e4dc42773..10546afaa 100644 --- a/share/completions/termux-toast.fish +++ b/share/completions/termux-toast.fish @@ -1,29 +1,19 @@ -set command termux-toast +set -l command termux-toast complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ +complete -c $command -s b -x \ -a '(__fish_termux_api__complete_colors)' \ - -s b \ - -d 'Specify the background color of a message' \ - -x + -d 'Specify the background color of a message' -complete -c $command \ +complete -c $command -s c -x \ -a '(__fish_termux_api__complete_colors)' \ - -s c \ - -d 'Specify the text color of a message' \ - -x + -d 'Specify the text color of a message' -complete -c $command \ +complete -c $command -s g -x \ -a 'middle\tdefault top bottom' \ - -s g \ - -d 'Specify the position of a message' \ - -x + -d 'Specify the position of a message' -complete -c $command \ - -s s \ - -d 'Show a message for the short period of time' +complete -c $command -s s -d 'Show a message for the short period of time' diff --git a/share/completions/termux-torch.fish b/share/completions/termux-torch.fish index 8d5df5f3c..49cca4fa7 100644 --- a/share/completions/termux-torch.fish +++ b/share/completions/termux-torch.fish @@ -1,11 +1,7 @@ -set command termux-torch +set -l command termux-torch complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -a 'on off' \ - -d 'Toggle the LED torch of a device' \ +complete -c $command -a 'on off' -d 'Toggle the LED torch of a device' diff --git a/share/completions/termux-tts-speak.fish b/share/completions/termux-tts-speak.fish index 4cb7c4429..a82b92c1e 100644 --- a/share/completions/termux-tts-speak.fish +++ b/share/completions/termux-tts-speak.fish @@ -1,44 +1,19 @@ -set command termux-tts-speak +set -l command termux-tts-speak complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ +complete -c $command -s e -x \ -a '(__fish_termux_api__complete_tts_engines)' \ - -s e \ - -d 'Specify the TTS engine for a speech' \ - -x + -d 'Specify the TTS engine for a speech' -complete -c $command \ - -s l \ - -d 'Specify the language of a speech' \ - -x +complete -c $command -s l -x -d 'Specify the language of a speech' +complete -c $command -s n -x -d 'Specify the region of a speech' +complete -c $command -s v -x -d 'Specify the language variant of a speech' +complete -c $command -s p -x -d 'Specify the pitch of a speech' +complete -c $command -s r -x -d 'Specify the rate of a speech' -complete -c $command \ - -s n \ - -d 'Specify the region of a speech' \ - -x - -complete -c $command \ - -s v \ - -d 'Specify the language variant of a speech' \ - -x - -complete -c $command \ - -s p \ - -d 'Specify the pitch of a speech' \ - -x - -complete -c $command \ - -s r \ - -d 'Specify the rate of a speech' \ - -x - -complete -c $command \ +complete -c $command -s s -x \ -a '(__fish_termux_api__complete_stream_ids | string replace --regex "(notification)" "\$1\tdefault")' \ - -s s \ - -d 'Specify the stream for a speech' \ - -x + -d 'Specify the stream for a speech' diff --git a/share/completions/termux-usb.fish b/share/completions/termux-usb.fish index bdff98ded..f8cc998e2 100644 --- a/share/completions/termux-usb.fish +++ b/share/completions/termux-usb.fish @@ -1,21 +1,9 @@ -set command termux-usb +set -l command termux-usb complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -s l \ - -d 'List all devices' - -complete -c $command \ - -s r \ - -d 'Show the permission request dialog for a device' - -complete -c $command \ - -s e \ - -d 'execute the specified command for a device' \ - -x - \ No newline at end of file +complete -c $command -s l -d 'List all devices' +complete -c $command -s r -d 'Show the permission request dialog for a device' +complete -c $command -s e -x -d 'Execute the specified command for a device' diff --git a/share/completions/termux-vibrate.fish b/share/completions/termux-vibrate.fish index 72f29398a..aa1d8ae79 100644 --- a/share/completions/termux-vibrate.fish +++ b/share/completions/termux-vibrate.fish @@ -1,17 +1,11 @@ -set command termux-vibrate +set -l command termux-vibrate complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ +complete -c $command -s d -x \ -a '1000\tdefault' \ - -s d \ - -d 'Specify the duration of a vibration' \ - -x + -d 'Specify the duration of a vibration' -complete -c $command \ - -s f \ - -d 'Vibrate in a silent mode too' +complete -c $command -s f -d 'Vibrate in a silent mode too' diff --git a/share/completions/termux-volume.fish b/share/completions/termux-volume.fish index ae5905075..62a8b5423 100644 --- a/share/completions/termux-volume.fish +++ b/share/completions/termux-volume.fish @@ -1,7 +1,6 @@ -set command termux-volume +set -l command termux-volume complete -c $command -f -complete -c $command \ - -a '(__fish_termux_api__complete_stream_ids)' \ +complete -c $command -a '(__fish_termux_api__complete_stream_ids)' \ -d 'Specify the stream for a volume' diff --git a/share/completions/termux-wallpaper.fish b/share/completions/termux-wallpaper.fish index 4e2ab78a8..7cfaae8f2 100644 --- a/share/completions/termux-wallpaper.fish +++ b/share/completions/termux-wallpaper.fish @@ -1,21 +1,9 @@ -set command termux-wallpaper +set -l command termux-wallpaper complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -s f \ - -d 'Specify the file of a wallpaper' \ - -F -r - -complete -c $command \ - -s u \ - -d 'Specify the uRL of a wallpaper' \ - -F -r - -complete -c $command \ - -s l \ - -d 'Set a wallpaper for the lockscreen' +complete -c $command -s f -F -r -d 'Specify the file of a wallpaper' +complete -c $command -s u -F -r -d 'Specify the uRL of a wallpaper' +complete -c $command -s l -d 'Set a wallpaper for the lockscreen' diff --git a/share/completions/termux-wifi-enable.fish b/share/completions/termux-wifi-enable.fish index cbd8e2c20..2558d2771 100644 --- a/share/completions/termux-wifi-enable.fish +++ b/share/completions/termux-wifi-enable.fish @@ -1,11 +1,8 @@ -set command termux-wifi-enable +set -l command termux-wifi-enable complete -c $command -f -complete -c $command \ - -s h \ - -d 'Show help' +complete -c $command -s h -d 'Show help' -complete -c $command \ - -a 'true false' \ +complete -c $command -a 'true false' \ -d 'Toggle the WiFi availability of a device'