aboutsummaryrefslogtreecommitdiff
path: root/scripts/bash_completion/pd
blob: d5de29942cb6a352f5a450fd0905f1dd8d832cc3 (plain)
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
73
74
75
76
77
78
# 
# bash_completion file for Pd. 
# 
# Save as: /etc/bash_completion.d/pd or ~/.bash_completion and enjoy
# never having to type any full command line option anymore. Instead you
# can press <TAB>.
#
# Later add some more fine grained settings, like having "-path"
# only complete on directory names etc. If you want to help, these are
# fine introductions to bash's completion feature:
# 
# http://www.debian-administration.org/articles/316
# http://www.debian-administration.org/articles/317
#
# First version written by Frank Barknecht <fbar AT footils.org>
# Dec 26 2005

have pd && 
_pd() 
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    #prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="-r \
    -audioindev \
    -audiooutdev \
    -audiodev \
    -inchannels \
    -outchannels \
    -channels \
    -audiobuf \
    -blocksize \
    -sleepgrain \
    -nodac \
    -noadc \
    -noaudio \
    -listdev \
    -oss \
    -32bit \
    -alsa \
    -alsaadd \
    -jack \
    -midiindev \
    -midioutdev \
    -mididev \
    -nomidiin \
    -nomidiout \
    -nomidi \
    -alsamidi \
    -path \
    -nostdpath \
    -stdpath \
    -helppath \
    -open \
    -lib \
    -font \
    -typeface \
    -verbose \
    -version \
    -d \
    -noloadbang \
    -stderr \
    -nogui \
    -guiport \
    -guicmd \
    -send \
    -rt \
    -realtime \
    -nrt"

    if [[ ${cur} == -* ]] ; then
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
    else
        _filedir '@(pd|pat)'
    fi
}
[ "${have:-}" ] &&  complete -F _pd $filenames pd