diff options
| author | salmonik <raisersoft@proton.me> | 2026-05-16 12:47:43 +0200 |
|---|---|---|
| committer | salmonik <raisersoft@proton.me> | 2026-05-16 12:47:43 +0200 |
| commit | 43562db0804338f2d55dff13439f1165f8dd9d3f (patch) | |
| tree | 134248a95024815194d152de56f9b3f70d24d096 /completions/rsp.elvish | |
| parent | Add scrobbling support (Last.fm + ListenBrainz) and rsp settings reload (diff) | |
| download | rsplayer-43562db0804338f2d55dff13439f1165f8dd9d3f.tar.gz rsplayer-43562db0804338f2d55dff13439f1165f8dd9d3f.zip | |
first public release.
Diffstat (limited to 'completions/rsp.elvish')
| -rw-r--r-- | completions/rsp.elvish | 224 |
1 files changed, 0 insertions, 224 deletions
diff --git a/completions/rsp.elvish b/completions/rsp.elvish deleted file mode 100644 index 54ccdfe..0000000 --- a/completions/rsp.elvish +++ /dev/null | |||
| @@ -1,224 +0,0 @@ | |||
| 1 | |||
| 2 | use builtin; | ||
| 3 | use str; | ||
| 4 | |||
| 5 | set edit:completion:arg-completer[rsp] = {|@words| | ||
| 6 | fn spaces {|n| | ||
| 7 | builtin:repeat $n ' ' | str:join '' | ||
| 8 | } | ||
| 9 | fn cand {|text desc| | ||
| 10 | edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc | ||
| 11 | } | ||
| 12 | var command = 'rsp' | ||
| 13 | for word $words[1..-1] { | ||
| 14 | if (str:has-prefix $word '-') { | ||
| 15 | break | ||
| 16 | } | ||
| 17 | set command = $command';'$word | ||
| 18 | } | ||
| 19 | var completions = [ | ||
| 20 | &'rsp'= { | ||
| 21 | cand -h 'Print help' | ||
| 22 | cand --help 'Print help' | ||
| 23 | cand start-daemon 'Start the daemon' | ||
| 24 | cand stop-daemon 'Stop the daemon' | ||
| 25 | cand restart 'Restart the daemon (kill existing and start new)' | ||
| 26 | cand play 'Play a track, album, or artist' | ||
| 27 | cand pause 'Pause playback' | ||
| 28 | cand resume 'Resume playback' | ||
| 29 | cand toggle 'Toggle play/pause' | ||
| 30 | cand stop 'Stop playback' | ||
| 31 | cand next 'Skip to next track' | ||
| 32 | cand previous 'Skip to previous track' | ||
| 33 | cand volume 'Set volume (0-100)' | ||
| 34 | cand shuffle 'Shuffle mode' | ||
| 35 | cand queue 'Queue management' | ||
| 36 | cand status 'Show player status' | ||
| 37 | cand scan 'Scan music paths to populate database' | ||
| 38 | cand settings 'Settings management' | ||
| 39 | cand completions 'Generate shell completions (developer only)' | ||
| 40 | cand help 'Print this message or the help of the given subcommand(s)' | ||
| 41 | } | ||
| 42 | &'rsp;start-daemon'= { | ||
| 43 | cand -h 'Print help' | ||
| 44 | cand --help 'Print help' | ||
| 45 | } | ||
| 46 | &'rsp;stop-daemon'= { | ||
| 47 | cand -h 'Print help' | ||
| 48 | cand --help 'Print help' | ||
| 49 | } | ||
| 50 | &'rsp;restart'= { | ||
| 51 | cand -h 'Print help' | ||
| 52 | cand --help 'Print help' | ||
| 53 | } | ||
| 54 | &'rsp;play'= { | ||
| 55 | cand -i 'Add after current track and skip to it' | ||
| 56 | cand --now 'Add after current track and skip to it' | ||
| 57 | cand -n 'Add to queue after current track (don''t skip)' | ||
| 58 | cand --next 'Add to queue after current track (don''t skip)' | ||
| 59 | cand -h 'Print help' | ||
| 60 | cand --help 'Print help' | ||
| 61 | } | ||
| 62 | &'rsp;pause'= { | ||
| 63 | cand -h 'Print help' | ||
| 64 | cand --help 'Print help' | ||
| 65 | } | ||
| 66 | &'rsp;resume'= { | ||
| 67 | cand -h 'Print help' | ||
| 68 | cand --help 'Print help' | ||
| 69 | } | ||
| 70 | &'rsp;toggle'= { | ||
| 71 | cand -h 'Print help' | ||
| 72 | cand --help 'Print help' | ||
| 73 | } | ||
| 74 | &'rsp;stop'= { | ||
| 75 | cand -h 'Print help' | ||
| 76 | cand --help 'Print help' | ||
| 77 | } | ||
| 78 | &'rsp;next'= { | ||
| 79 | cand -h 'Print help' | ||
| 80 | cand --help 'Print help' | ||
| 81 | } | ||
| 82 | &'rsp;previous'= { | ||
| 83 | cand -h 'Print help' | ||
| 84 | cand --help 'Print help' | ||
| 85 | } | ||
| 86 | &'rsp;volume'= { | ||
| 87 | cand -h 'Print help' | ||
| 88 | cand --help 'Print help' | ||
| 89 | } | ||
| 90 | &'rsp;shuffle'= { | ||
| 91 | cand -h 'Print help' | ||
| 92 | cand --help 'Print help' | ||
| 93 | } | ||
| 94 | &'rsp;queue'= { | ||
| 95 | cand -h 'Print help' | ||
| 96 | cand --help 'Print help' | ||
| 97 | } | ||
| 98 | &'rsp;status'= { | ||
| 99 | cand -h 'Print help' | ||
| 100 | cand --help 'Print help' | ||
| 101 | } | ||
| 102 | &'rsp;scan'= { | ||
| 103 | cand --paths 'paths' | ||
| 104 | cand --force 'force' | ||
| 105 | cand -h 'Print help' | ||
| 106 | cand --help 'Print help' | ||
| 107 | } | ||
| 108 | &'rsp;settings'= { | ||
| 109 | cand -h 'Print help' | ||
| 110 | cand --help 'Print help' | ||
| 111 | cand get 'Get a setting value' | ||
| 112 | cand set 'Set a setting value' | ||
| 113 | cand list 'List all settings' | ||
| 114 | cand unset 'Unset a setting' | ||
| 115 | cand help 'Print this message or the help of the given subcommand(s)' | ||
| 116 | } | ||
| 117 | &'rsp;settings;get'= { | ||
| 118 | cand -h 'Print help' | ||
| 119 | cand --help 'Print help' | ||
| 120 | } | ||
| 121 | &'rsp;settings;set'= { | ||
| 122 | cand -h 'Print help' | ||
| 123 | cand --help 'Print help' | ||
| 124 | } | ||
| 125 | &'rsp;settings;list'= { | ||
| 126 | cand -h 'Print help' | ||
| 127 | cand --help 'Print help' | ||
| 128 | } | ||
| 129 | &'rsp;settings;unset'= { | ||
| 130 | cand -h 'Print help' | ||
| 131 | cand --help 'Print help' | ||
| 132 | } | ||
| 133 | &'rsp;settings;help'= { | ||
| 134 | cand get 'Get a setting value' | ||
| 135 | cand set 'Set a setting value' | ||
| 136 | cand list 'List all settings' | ||
| 137 | cand unset 'Unset a setting' | ||
| 138 | cand help 'Print this message or the help of the given subcommand(s)' | ||
| 139 | } | ||
| 140 | &'rsp;settings;help;get'= { | ||
| 141 | } | ||
| 142 | &'rsp;settings;help;set'= { | ||
| 143 | } | ||
| 144 | &'rsp;settings;help;list'= { | ||
| 145 | } | ||
| 146 | &'rsp;settings;help;unset'= { | ||
| 147 | } | ||
| 148 | &'rsp;settings;help;help'= { | ||
| 149 | } | ||
| 150 | &'rsp;completions'= { | ||
| 151 | cand -h 'Print help' | ||
| 152 | cand --help 'Print help' | ||
| 153 | } | ||
| 154 | &'rsp;help'= { | ||
| 155 | cand start-daemon 'Start the daemon' | ||
| 156 | cand stop-daemon 'Stop the daemon' | ||
| 157 | cand restart 'Restart the daemon (kill existing and start new)' | ||
| 158 | cand play 'Play a track, album, or artist' | ||
| 159 | cand pause 'Pause playback' | ||
| 160 | cand resume 'Resume playback' | ||
| 161 | cand toggle 'Toggle play/pause' | ||
| 162 | cand stop 'Stop playback' | ||
| 163 | cand next 'Skip to next track' | ||
| 164 | cand previous 'Skip to previous track' | ||
| 165 | cand volume 'Set volume (0-100)' | ||
| 166 | cand shuffle 'Shuffle mode' | ||
| 167 | cand queue 'Queue management' | ||
| 168 | cand status 'Show player status' | ||
| 169 | cand scan 'Scan music paths to populate database' | ||
| 170 | cand settings 'Settings management' | ||
| 171 | cand completions 'Generate shell completions (developer only)' | ||
| 172 | cand help 'Print this message or the help of the given subcommand(s)' | ||
| 173 | } | ||
| 174 | &'rsp;help;start-daemon'= { | ||
| 175 | } | ||
| 176 | &'rsp;help;stop-daemon'= { | ||
| 177 | } | ||
| 178 | &'rsp;help;restart'= { | ||
| 179 | } | ||
| 180 | &'rsp;help;play'= { | ||
| 181 | } | ||
| 182 | &'rsp;help;pause'= { | ||
| 183 | } | ||
| 184 | &'rsp;help;resume'= { | ||
| 185 | } | ||
| 186 | &'rsp;help;toggle'= { | ||
| 187 | } | ||
| 188 | &'rsp;help;stop'= { | ||
| 189 | } | ||
| 190 | &'rsp;help;next'= { | ||
| 191 | } | ||
| 192 | &'rsp;help;previous'= { | ||
| 193 | } | ||
| 194 | &'rsp;help;volume'= { | ||
| 195 | } | ||
| 196 | &'rsp;help;shuffle'= { | ||
| 197 | } | ||
| 198 | &'rsp;help;queue'= { | ||
| 199 | } | ||
| 200 | &'rsp;help;status'= { | ||
| 201 | } | ||
| 202 | &'rsp;help;scan'= { | ||
| 203 | } | ||
| 204 | &'rsp;help;settings'= { | ||
| 205 | cand get 'Get a setting value' | ||
| 206 | cand set 'Set a setting value' | ||
| 207 | cand list 'List all settings' | ||
| 208 | cand unset 'Unset a setting' | ||
| 209 | } | ||
| 210 | &'rsp;help;settings;get'= { | ||
| 211 | } | ||
| 212 | &'rsp;help;settings;set'= { | ||
| 213 | } | ||
| 214 | &'rsp;help;settings;list'= { | ||
| 215 | } | ||
| 216 | &'rsp;help;settings;unset'= { | ||
| 217 | } | ||
| 218 | &'rsp;help;completions'= { | ||
| 219 | } | ||
| 220 | &'rsp;help;help'= { | ||
| 221 | } | ||
| 222 | ] | ||
| 223 | $completions[$command] | ||
| 224 | } | ||
