-
Notifications
You must be signed in to change notification settings - Fork 0
/
autocomplete
executable file
·72 lines (69 loc) · 1.82 KB
/
autocomplete
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
_pdshell()
{
local cur=${COMP_WORDS[COMP_CWORD]}
local prev=${COMP_WORDS[((COMP_CWORD-1))]}
case "$prev" in
-c|--config)
_filedir conf
return
;;
-s|--song)
_filedir '@(8svx|aif|aifc|aiff|aiffc|al|amb|amr-nb|amr-wb|anb|au|avr|awb|caf|cdda|cdr|cvs|cvsd|cvu|dat|dvms|f32|f4|f64|f8|fap|flac|fssd|gsm|gsrt|hcom|htk|ima|ircam|la|lpc|lpc10|lu|mat|mat4|mat5|maud|mp2|mp3|nist|ogg|paf|prc|pvf|raw|s1|s16|s2|s24|s3|s32|s4|s8|sb|sd2|sds|sf|sl|sln|smp|snd|sndfile|sndr|sndt|sou|sox|sph|sw|txw|u1|u16|u2|u24|u3|u32|u4|u8|ub|ul|uw|vms|voc|vorbis|vox|w64|wav|wavpcm|wv|wve|xa|xi|m3u|pls)'
return
;;
-ed|-elbc|-esbc|-sc|-slbc|-ssbc|--player|--alarm-player|--end-cmd|--end-long-break-cmd|--end-short-break-cmd|--start-cmd|--start-long-break-cmd|--start-short-break-cmd)
_filedir
COMPREPLY=($(compgen -A command -- ${cur}))
return
;;
esac
if [ $prev != "pdshell" ]
then
_filedir
COMPREPLY+=($(compgen -A command -- ${cur}))
fi
_pds_default_params
}
_pds_default_params() {
local params="
-c
-d
-ec
-elbc
-esbc
-f
-h
-ld
-m
-n
-nc
-nm
-s
-sc
-slbc
-ssbc
-t
--config
--delay
--edit-config
--end-cmd
--end-long-break-cmd
--end-short-break-cmd
--help
--install
--long-delay
--music
--no-config
--no-music
--player
--song
--start-cmd
--start-long-break-cmd
--start-short-break-cmd
--time
--uninstall
"
COMPREPLY+=($(compgen -W "$params" -- "$cur"))
}
complete -F _pdshell pdshell