mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-24 11:53:09 +00:00
fix(completion): variable assignments
This commit is contained in:
parent
ca50a676b4
commit
361e6aa292
3 changed files with 7 additions and 8 deletions
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue