From 1166424eeb39cd50b4ce29594cd4349890550efb Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Wed, 16 Aug 2023 21:56:08 +0200 Subject: [PATCH] Replace some uses of __fish_complete_list --- share/completions/adb.fish | 2 +- share/completions/dmesg.fish | 4 ++-- share/completions/mocp.fish | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/completions/adb.fish b/share/completions/adb.fish index f093f69d6..a91eed0dd 100644 --- a/share/completions/adb.fish +++ b/share/completions/adb.fish @@ -194,7 +194,7 @@ complete -n '__fish_seen_subcommand_from push' -c adb -F -a "(__fish_adb_list_fi complete -n '__fish_seen_subcommand_from logcat' -c adb -f # general options complete -n '__fish_seen_subcommand_from logcat' -c adb -s L -l last -d 'Dump logs from prior to last reboot from pstore' -complete -n '__fish_seen_subcommand_from logcat' -c adb -s b -l buffer -d ' Request alternate ring buffer(s)' -xa '(__fish_complete_list , "echo main\nsystem\nradio\nevents\ncrash\ndefault\nall")' +complete -n '__fish_seen_subcommand_from logcat' -c adb -s b -l buffer -d ' Request alternate ring buffer(s)' -xa '(__fish_append , main system radio events crash default all)' complete -n '__fish_seen_subcommand_from logcat' -c adb -s c -l clear -d 'Clear (flush) the entire log and exit' complete -n '__fish_seen_subcommand_from logcat' -c adb -s d -d 'Dump the log and then exit (don\'t block)' complete -n '__fish_seen_subcommand_from logcat' -c adb -l pid -d 'Only print the logs for the given PID' diff --git a/share/completions/dmesg.fish b/share/completions/dmesg.fish index 851ac3e68..b288cfc05 100644 --- a/share/completions/dmesg.fish +++ b/share/completions/dmesg.fish @@ -10,14 +10,14 @@ switch (uname -s) # Loonix dmesg # case Linux - set -l levels '( __fish_complete_list , "echo emerg\nalert\ncrit\nerr\nwarn\nnotice\ninfo\ndebug" )' + set -l levels '( __fish_append , emerg alert crit err warn notice info debug)' complete -c dmesg -s C -l clear -f -d'Clear kernel ring buffer' complete -c dmesg -s c -l read-clear -f -d'Read & clear all msgs' complete -c dmesg -s D -l console-off -f -d'Disable writing to console' complete -c dmesg -s d -l show-delta -f -d'Show timestamp deltas' complete -c dmesg -s E -l console-on -f -d'Enable writing to console' complete -c dmesg -s F -l file -r -d'Use file instead of log buffer' - complete -c dmesg -s f -l facility -x -d'Only print for given facilities' -a '( __fish_complete_list , "echo kern\nuser\nmail\ndaemon\nauth\nsyslog\nlpr\nnews" )' + complete -c dmesg -s f -l facility -x -d'Only print for given facilities' -a '( __fish_append , kern user mail daemon auth syslog lpr news)' complete -c dmesg -s h -l help -f -d'Display help' complete -c dmesg -s k -l kernel -f -d'Print kernel messages' complete -c dmesg -s l -l level -x -d'Restrict output to given levels' -a $levels diff --git a/share/completions/mocp.fish b/share/completions/mocp.fish index 321a9bf01..7ad5eae30 100644 --- a/share/completions/mocp.fish +++ b/share/completions/mocp.fish @@ -32,4 +32,4 @@ complete -c mocp -s k -l seek -rf -d "Seek by N seconds (can be negative)" complete -c mocp -s j -l jump -rf -d "N{%,s} Jump to some position of the current track" complete -c mocp -s o -l on -d "Turn on a control" -xa 'shuffle autonext repeat' complete -c mocp -s u -l off -d "Turn off a control" -xa 'shuffle autonext repeat' -complete -c mocp -s t -l toggle -d "Toggle a control" -xa '(__fish_complete_list , "echo shuffle\nautonext\nrepeat\ns\tshuffle\nr\trepeat\nn\tautonext")' +complete -c mocp -s t -l toggle -d "Toggle a control" -xa '(__fish_append , shuffle autonext repeat s\tshuffle r\trepeat n\tautonext)'