| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | __cardsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __cards(). () { |
| 4 | while IFS=$'\t' read idx name _; do |
| 5 | printfscip-shell system . . printf. "%s %s\n" "$idx" "$name" |
| 6 | done < <(pactl list cards short 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 7 | } |
| 8 | |
| 9 | __sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks(). () { |
| 10 | while IFS=$'\t' read _ name _ _ _; do |
| 11 | printfscip-shell system . . printf. "%s\n" "$name" |
| 12 | done < <(pactl list sinks short 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 13 | } |
| 14 | |
| 15 | __sinks_idxscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks_idx(). () { |
| 16 | while IFS=$'\t' read idx _ _ _ _; do |
| 17 | printfscip-shell system . . printf. "%s\n" "$idx" |
| 18 | done < <(pactl list sinks short 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 19 | } |
| 20 | |
| 21 | __sourcesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sources(). () { |
| 22 | while IFS=$'\t' read _ name _ _ _; do |
| 23 | printfscip-shell system . . printf. "%s\n" "$name" |
| 24 | done < <(pactl list sources short 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 25 | } |
| 26 | |
| 27 | __sink_inputsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sink_inputs(). () { |
| 28 | while IFS=$'\t' read idx _ _ _ _; do |
| 29 | printfscip-shell system . . printf. "%s\n" "$idx" |
| 30 | done < <(pactl list sink-inputs short 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 31 | } |
| 32 | |
| 33 | __source_outputsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __source_outputs(). () { |
| 34 | while IFS=$'\t' read idx _ _ _ _; do |
| 35 | printfscip-shell system . . printf. "%s\n" "$idx" |
| 36 | done < <(pactl list source-outputs short 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 37 | } |
| 38 | |
| 39 | __portsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __ports(). () { |
| 40 | pactl list cards 2> /dev/nullscip-shell filesystem . . `/dev/null`. | awkscip-shell system . . awk. -- \ |
| 41 | '/^\tPorts:/ { |
| 42 | flag=1; next |
| 43 | } |
| 44 | |
| 45 | /^\t[A-Za-z]/ { |
| 46 | flag=0 |
| 47 | } |
| 48 | |
| 49 | flag { |
| 50 | if (/^\t\t[A-Za-z]/) |
| 51 | ports = ports substr($0, 3, index($0, ":")-3) " " |
| 52 | } |
| 53 | |
| 54 | END { |
| 55 | print ports |
| 56 | }' |
| 57 | } |
| 58 | |
| 59 | __profilesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __profiles(). () { |
| 60 | pactl list cards 2> /dev/nullscip-shell filesystem . . `/dev/null`. | awkscip-shell system . . awk. -- \ |
| 61 | '/^\tProfiles:/ { |
| 62 | flag=1; next |
| 63 | } |
| 64 | |
| 65 | /^\t[A-Za-z]/ { |
| 66 | flag=0 |
| 67 | } |
| 68 | |
| 69 | flag { |
| 70 | if (/^\t\t[A-Za-z]/) |
| 71 | profiles = profiles substr($0, 3, index($0, ": ")-3) " " |
| 72 | } |
| 73 | |
| 74 | END { |
| 75 | print profiles |
| 76 | }' |
| 77 | } |
| 78 | |
| 79 | __all_modulesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __all_modules(). () { |
| 80 | while read name; do |
| 81 | name=${name%% *} |
| 82 | printfscip-shell system . . printf. "%s\n" "$name" |
| 83 | done < <(pulseaudio --dump-modules 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 84 | } |
| 85 | |
| 86 | __loaded_modulesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __loaded_modules(). () { |
| 87 | while IFS=$'\t' read idx name _; do |
| 88 | printfscip-shell system . . printf. "%s %s\n" "$idx" "$name" |
| 89 | done < <(pactl list modules short 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 90 | } |
| 91 | |
| 92 | __resample_methodsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __resample_methods(). () { |
| 93 | while read name; do |
| 94 | printfscip-shell system . . printf. "%s\n" "$name" |
| 95 | done < <(pulseaudio --dump-resample-methods 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 96 | } |
| 97 | |
| 98 | _pacat_file_formatsscip-shell shell pulseaudio 17.0+dfsg1-2.1 _pacat_file_formats(). () { |
| 99 | while IFS=$'\t' read name _; do |
| 100 | printfscip-shell system . . printf. "%s\n" "$name" |
| 101 | done < <(pacat --list-file-formats 2> /dev/nullscip-shell filesystem . . `/dev/null`.) |
| 102 | } |
| 103 | |
| 104 | in_arrayscip-shell shell pulseaudio 17.0+dfsg1-2.1 in_array().() { |
| 105 | local i |
| 106 | for i in "${@:2}"; do |
| 107 | [[ $1 = "$i" ]] && return |
| 108 | done |
| 109 | } |
| 110 | |
| 111 | _pactlscip-shell shell pulseaudio 17.0+dfsg1-2.1 _pactl().() { |
| 112 | local cur prev words cword preprev word command |
| 113 | local comps |
| 114 | local flags='-h --help --version -s --server= --client-name=' |
| 115 | local list_types='short sinks sources sink-inputs source-outputs cards |
| 116 | modules samples clients message-handlers' |
| 117 | local commands=(stat info list exit upload-sample play-sample remove-sample |
| 118 | load-module unload-module move-sink-input move-source-output |
| 119 | suspend-sink suspend-source set-card-profile get-default-sink |
| 120 | set-default-sink set-sink-port get-default-source set-default-source |
| 121 | set-source-port get-sink-volume set-sink-volume get-source-volume |
| 122 | set-source-volume set-sink-input-volume set-source-output-volume |
| 123 | get-sink-mute set-sink-mute get-source-mute set-source-mute |
| 124 | set-sink-input-mute set-source-output-mute set-sink-formats |
| 125 | set-port-latency-offset subscribe send-message help) |
| 126 | |
| 127 | _init_completion -n = || return |
| 128 | preprev=${words[$cword-2]} |
| 129 | |
| 130 | for word in "${COMP_WORDS[@]}"; do |
| 131 | if in_arrayscip-shell shell pulseaudio 17.0+dfsg1-2.1 in_array(). "$word" "${commands[@]}"; then |
| 132 | command=$word |
| 133 | break |
| 134 | fi |
| 135 | done |
| 136 | |
| 137 | case $preprev in |
| 138 | list) COMPREPLY=($(compgen -W 'short' -- "$cur")) ;; |
| 139 | |
| 140 | play-sample) |
| 141 | comps=$(__sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks().) |
| 142 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 143 | ;; |
| 144 | |
| 145 | move-sink-input) |
| 146 | comps=$(__sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks().) |
| 147 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 148 | ;; |
| 149 | |
| 150 | move-source-output) |
| 151 | comps=$(__sourcesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sources().) |
| 152 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 153 | ;; |
| 154 | |
| 155 | set-card-profile) |
| 156 | comps=$(__profilesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __profiles().) |
| 157 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 158 | ;; |
| 159 | |
| 160 | set-*-port) |
| 161 | comps=$(__portsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __ports().) |
| 162 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 163 | ;; |
| 164 | |
| 165 | set-*-mute) COMPREPLY=($(compgen -W 'true false toggle' -- "$cur")) ;; |
| 166 | |
| 167 | set-sink-formats) |
| 168 | ;; #TODO |
| 169 | |
| 170 | set-port-*) |
| 171 | comps=$(__portsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __ports().) |
| 172 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 173 | ;; |
| 174 | --server) |
| 175 | compopt +o nospace |
| 176 | _known_hosts_real "$cur" |
| 177 | ;; |
| 178 | esac |
| 179 | [[ $COMPREPLY ]] && return 0 |
| 180 | |
| 181 | case $prev in |
| 182 | list) COMPREPLY=($(compgen -W '${list_types[*]}' -- "$cur")) ;; |
| 183 | |
| 184 | upload-sample) _filedir ;; |
| 185 | |
| 186 | play-sample) ;; # TODO |
| 187 | |
| 188 | remove-sample) ;; # TODO |
| 189 | |
| 190 | get-default*) ;; |
| 191 | |
| 192 | load-module) |
| 193 | comps=$(__all_modulesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __all_modules().) |
| 194 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 195 | ;; |
| 196 | |
| 197 | unload-module) |
| 198 | comps=$(__loaded_modulesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __loaded_modules().) |
| 199 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 200 | ;; |
| 201 | |
| 202 | set-card*) |
| 203 | comps=$(__cardsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __cards().) |
| 204 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 205 | ;; |
| 206 | |
| 207 | *sink-input*) |
| 208 | comps=$(__sink_inputsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sink_inputs().) |
| 209 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 210 | ;; |
| 211 | |
| 212 | *source-output*) |
| 213 | comps=$(__source_outputsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __source_outputs().) |
| 214 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 215 | ;; |
| 216 | |
| 217 | set-sink-formats) |
| 218 | comps=$(__sinks_idxscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks_idx().) |
| 219 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 220 | ;; |
| 221 | |
| 222 | *sink*) |
| 223 | comps=$(__sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks().) |
| 224 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 225 | ;; |
| 226 | |
| 227 | *source*) |
| 228 | comps=$(__sourcesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sources().) |
| 229 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 230 | ;; |
| 231 | |
| 232 | set-port*) |
| 233 | comps=$(__cardsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __cards().) |
| 234 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 235 | ;; |
| 236 | |
| 237 | -s) |
| 238 | _known_hosts_real "$cur" ;; |
| 239 | esac |
| 240 | [[ $COMPREPLY ]] && return 0 |
| 241 | |
| 242 | case $cur in |
| 243 | --server=*) |
| 244 | cur=${cur#*=} |
| 245 | _known_hosts_real "$cur" |
| 246 | ;; |
| 247 | |
| 248 | -*) |
| 249 | COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")) |
| 250 | [[ $COMPREPLY == *= ]] && compopt -o nospace |
| 251 | ;; |
| 252 | |
| 253 | *) |
| 254 | [[ -z $command ]] && COMPREPLY=($(compgen -W '${commands[*]}' -- "$cur")) |
| 255 | ;; |
| 256 | esac |
| 257 | } |
| 258 | complete -F _pactl pactl |
| 259 | |
| 260 | _pacmdscip-shell shell pulseaudio 17.0+dfsg1-2.1 _pacmd().() { |
| 261 | local cur prev words cword preprev word command |
| 262 | local comps |
| 263 | local flags='-h --help --version' |
| 264 | local commands=(exit help list-modules list-cards list-sinks list-sources list-clients |
| 265 | list-samples list-sink-inputs list-source-outputs stat info |
| 266 | load-module unload-module describe-module set-sink-volume |
| 267 | set-source-volume set-sink-input-volume set-source-output-volume |
| 268 | set-sink-mute set-source-mut set-sink-input-mute |
| 269 | set-source-output-mute update-sink-proplist update-source-proplist |
| 270 | update-sink-input-proplist update-source-output-proplist |
| 271 | set-default-sink set-default-source kill-client kill-sink-input |
| 272 | kill-source-output play-sample remove-sample load-sample |
| 273 | load-sample-lazy load-sample-dir-lazy play-file dump |
| 274 | move-sink-input move-source-output suspend-sink suspend-source |
| 275 | suspend set-card-profile set-sink-port set-source-port |
| 276 | set-port-latency-offset set-log-target set-log-level set-log-meta |
| 277 | set-log-time set-log-backtrace send-message) |
| 278 | _init_completion -n = || return |
| 279 | preprev=${words[$cword-2]} |
| 280 | |
| 281 | for word in "${COMP_WORDS[@]}"; do |
| 282 | if in_arrayscip-shell shell pulseaudio 17.0+dfsg1-2.1 in_array(). "$word" "${commands[@]}"; then |
| 283 | command=$word |
| 284 | break |
| 285 | fi |
| 286 | done |
| 287 | |
| 288 | case $preprev in |
| 289 | play-sample|play-file) |
| 290 | comps=$(__sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks().) |
| 291 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 292 | ;; |
| 293 | |
| 294 | load-sample*) _filedir ;; |
| 295 | |
| 296 | move-sink-input) |
| 297 | comps=$(__sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks().) |
| 298 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 299 | ;; |
| 300 | |
| 301 | move-source-output) |
| 302 | comps=$(__sourcesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sources().) |
| 303 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 304 | ;; |
| 305 | |
| 306 | set-card-profile) |
| 307 | comps=$(__profilesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __profiles().) |
| 308 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 309 | ;; |
| 310 | |
| 311 | set-*port*) |
| 312 | comps=$(__portsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __ports().) |
| 313 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 314 | ;; |
| 315 | |
| 316 | set-*-mute) COMPREPLY=($(compgen -W 'true false' -- "$cur"));; |
| 317 | |
| 318 | set-sink-formats) |
| 319 | ;; #TODO |
| 320 | esac |
| 321 | |
| 322 | case $prev in |
| 323 | list-*) ;; |
| 324 | describe-module|load-module) |
| 325 | comps=$(__all_modulesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __all_modules().) |
| 326 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 327 | ;; |
| 328 | |
| 329 | unload-module) |
| 330 | comps=$(__loaded_modulesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __loaded_modules().) |
| 331 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 332 | ;; |
| 333 | |
| 334 | load-sample-dir-lazy) _filedir -d ;; |
| 335 | play-file) _filedir ;; |
| 336 | |
| 337 | *sink-input*) |
| 338 | comps=$(__sink_inputsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sink_inputs().) |
| 339 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 340 | ;; |
| 341 | |
| 342 | *source-output*) |
| 343 | comps=$(__source_outputsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __source_outputs().) |
| 344 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 345 | ;; |
| 346 | |
| 347 | *sink*) |
| 348 | comps=$(__sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks().) |
| 349 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 350 | ;; |
| 351 | |
| 352 | *source*) |
| 353 | comps=$(__sourcesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sources().) |
| 354 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 355 | ;; |
| 356 | |
| 357 | set-card*) |
| 358 | comps=$(__cardsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __cards().) |
| 359 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 360 | ;; |
| 361 | |
| 362 | set-port-*) |
| 363 | comps=$(__cardsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __cards().) |
| 364 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 365 | ;; |
| 366 | |
| 367 | set-log-target) |
| 368 | COMPREPLY=($(compgen -W 'auto syslog stderr file: newfile:' -- "$cur")) |
| 369 | ;; |
| 370 | |
| 371 | set-log-level) |
| 372 | COMPREPLY=($(compgen -W '{0..4}' -- "$cur")) |
| 373 | ;; |
| 374 | |
| 375 | set-log-meta|set-log-time|suspend) |
| 376 | COMPREPLY=($(compgen -W 'true false' -- "$cur")) |
| 377 | ;; |
| 378 | esac |
| 379 | |
| 380 | case $cur in |
| 381 | -*) COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")) ;; |
| 382 | suspend) |
| 383 | COMPREPLY=($(compgen -W 'suspend suspend-sink suspend-source' -- "$cur")) |
| 384 | ;; |
| 385 | |
| 386 | load-sample) |
| 387 | COMPREPLY=($(compgen -W 'load-sample load-sample-lazy load-sample-dir-lazy' -- "$cur")) |
| 388 | ;; |
| 389 | |
| 390 | *) |
| 391 | [[ -z $command ]] && COMPREPLY=($(compgen -W '${commands[*]}' -- "$cur")) |
| 392 | ;; |
| 393 | esac |
| 394 | } |
| 395 | complete -F _pacmd pacmd |
| 396 | |
| 397 | _pasuspenderscip-shell shell pulseaudio 17.0+dfsg1-2.1 _pasuspender(). () { |
| 398 | local cur prev |
| 399 | local flags='-h --help --version -s --server=' |
| 400 | |
| 401 | _init_completion -n = || return |
| 402 | |
| 403 | case $cur in |
| 404 | --server=*) |
| 405 | cur=${cur#*=} |
| 406 | _known_hosts_real "$cur" |
| 407 | ;; |
| 408 | |
| 409 | -*) |
| 410 | COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")) |
| 411 | [[ $COMPREPLY == *= ]] && compopt -o nospace |
| 412 | ;; |
| 413 | esac |
| 414 | |
| 415 | case $prev in |
| 416 | -s) _known_hosts_real "$cur" ;; |
| 417 | esac |
| 418 | } |
| 419 | complete -F _pasuspender pasuspender |
| 420 | |
| 421 | _padspscip-shell shell pulseaudio 17.0+dfsg1-2.1 _padsp(). () { |
| 422 | local cur prev |
| 423 | local flags='-h -s -n -m -M -S -D -d' |
| 424 | |
| 425 | _get_comp_words_by_ref cur prev |
| 426 | |
| 427 | case $cur in |
| 428 | -*) COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")) ;; |
| 429 | esac |
| 430 | |
| 431 | case $prev in |
| 432 | -s) _known_hosts_real "$cur" ;; |
| 433 | esac |
| 434 | } |
| 435 | complete -F _padsp padsp |
| 436 | |
| 437 | _pacatscip-shell shell pulseaudio 17.0+dfsg1-2.1 _pacat(). () { |
| 438 | local cur prev comps |
| 439 | local flags='-h --help --version -r --record -p --playback -v --verbose -s |
| 440 | --server= -d --device= -n --client-name= --stream-name= --volume= |
| 441 | --rate= --format= --channels= --channel-map= --fix-format --fix-rate |
| 442 | --fix-channels --no-remix --no-remap --latency= --process-time= |
| 443 | --latency-msec= --process-time-msec= --property= --raw --passthrough |
| 444 | --file-format= --list-file-formats --monitor-stream=' |
| 445 | |
| 446 | _init_completion -n = || return |
| 447 | |
| 448 | case $cur in |
| 449 | --server=*) |
| 450 | cur=${cur#*=} |
| 451 | _known_hosts_real "$cur" |
| 452 | ;; |
| 453 | |
| 454 | --device=*) |
| 455 | cur=${cur#*=} |
| 456 | comps=$(__sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks().) |
| 457 | comps+=" "$(__sourcesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sources().) |
| 458 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 459 | ;; |
| 460 | |
| 461 | --monitor-stream=*) |
| 462 | cur=${cur#*=} |
| 463 | comps=$(__sink_inputsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sink_inputs().) |
| 464 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 465 | ;; |
| 466 | |
| 467 | --rate=*) |
| 468 | cur=${cur#*=} |
| 469 | COMPREPLY=($(compgen -W '32000 44100 48000 9600 192000' -- "$cur")) |
| 470 | ;; |
| 471 | |
| 472 | --file-format=*) |
| 473 | cur=${cur#*=} |
| 474 | comps=$(_pacat_file_formatsscip-shell shell pulseaudio 17.0+dfsg1-2.1 _pacat_file_formats().) |
| 475 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 476 | ;; |
| 477 | |
| 478 | --*=*) |
| 479 | ;; |
| 480 | |
| 481 | -*) |
| 482 | COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")) |
| 483 | [[ $COMPREPLY == *= ]] && compopt -o nospace |
| 484 | ;; |
| 485 | *) _filedir ;; |
| 486 | esac |
| 487 | |
| 488 | case $prev in |
| 489 | -s) _known_hosts_real "$cur" ;; |
| 490 | -d) |
| 491 | comps=$(__sinksscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sinks().) |
| 492 | comps+=" "$(__sourcesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __sources().) |
| 493 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 494 | ;; |
| 495 | esac |
| 496 | } |
| 497 | complete -F _pacat pacat paplay parec parecord |
| 498 | |
| 499 | _pulseaudioscip-shell shell pulseaudio 17.0+dfsg1-2.1 _pulseaudio().() |
| 500 | { |
| 501 | local cur prev words cword |
| 502 | local flags='-h --help --version --dump-conf --dump-resample-methods --cleanup-shm |
| 503 | --start -k --kill --check --system= -D --daemonize= --fail= --high-priority= |
| 504 | --realtime= --disallow-module-loading= --disallow-exit= --exit-idle-time= |
| 505 | --scache-idle-time= --log-level= -v --log-target= --log-meta= --log-time= |
| 506 | --log-backtrace= -p --dl-search-path= --resample-method= --use-pid-file= |
| 507 | --no-cpu-limit= --disable-shm= --enable-memfd= -L --load= -F --file= -C -n' |
| 508 | _init_completion -n = || return |
| 509 | |
| 510 | case $cur in |
| 511 | --system=*|--daemonize=*|--fail=*|--high-priority=*|--realtime=*| \ |
| 512 | --disallow-*=*|--log-meta=*|--log-time=*|--use-pid-file=*| \ |
| 513 | --no-cpu-limit=*|--disable-shm=*|--enable-memfd=*) |
| 514 | cur=${cur#*=} |
| 515 | COMPREPLY=($(compgen -W 'true false' -- "$cur")) |
| 516 | ;; |
| 517 | |
| 518 | --log-target=*) |
| 519 | cur=${cur#*=} |
| 520 | COMPREPLY=($(compgen -W 'auto syslog stderr file: newfile:' -- "$cur")) |
| 521 | ;; |
| 522 | |
| 523 | --log-level=*) |
| 524 | cur=${cur#*=} |
| 525 | COMPREPLY=($(compgen -W '{0..4}' -- "$cur")) |
| 526 | ;; |
| 527 | |
| 528 | --dl-search-path=*) |
| 529 | cur=${cur#*=} |
| 530 | _filedir -d |
| 531 | ;; |
| 532 | |
| 533 | --file=*) |
| 534 | cur=${cur#*=} |
| 535 | _filedir |
| 536 | ;; |
| 537 | |
| 538 | --resample-method=*) |
| 539 | cur=${cur#*=} |
| 540 | comps=$(__resample_methodsscip-shell shell pulseaudio 17.0+dfsg1-2.1 __resample_methods().) |
| 541 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 542 | ;; |
| 543 | |
| 544 | --load=*) |
| 545 | cur=${cur#*=} |
| 546 | comps=$(__all_modulesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __all_modules().) |
| 547 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 548 | ;; |
| 549 | |
| 550 | --*=*) |
| 551 | ;; |
| 552 | |
| 553 | -*) |
| 554 | COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")) |
| 555 | [[ $COMPREPLY == *= ]] && compopt -o nospace |
| 556 | ;; |
| 557 | esac |
| 558 | |
| 559 | case $prev in |
| 560 | -D) COMPREPLY=($(compgen -W 'true false' -- "$cur")) ;; |
| 561 | -p) _filedir -d ;; |
| 562 | -F) _filedir ;; |
| 563 | -L) |
| 564 | cur=${cur#*=} |
| 565 | comps=$(__all_modulesscip-shell shell pulseaudio 17.0+dfsg1-2.1 __all_modules().) |
| 566 | COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) |
| 567 | ;; |
| 568 | esac |
| 569 | } |
| 570 | complete -F _pulseaudio pulseaudio |
| 571 | |
| 572 | #vim: set ft=zsh sw=4 ts=4 noet |