aboutsummaryrefslogtreecommitdiff
path: root/scripts/bash_completion
diff options
context:
space:
mode:
authorFrank Barknecht <fbar@users.sourceforge.net>2005-12-26 16:27:24 +0000
committerFrank Barknecht <fbar@users.sourceforge.net>2005-12-26 16:27:24 +0000
commit52f6c502a113e77ad7ad8d38ca40134c6c917cc3 (patch)
tree483ec190763b7e97f37e413982696ad6929fb9de /scripts/bash_completion
parent352d2c324c882f41055258385c9365ad490f990c (diff)
First version of bash_completion file added.
svn path=/trunk/; revision=4297
Diffstat (limited to 'scripts/bash_completion')
-rw-r--r--scripts/bash_completion/pd78
1 files changed, 78 insertions, 0 deletions
diff --git a/scripts/bash_completion/pd b/scripts/bash_completion/pd
new file mode 100644
index 00000000..d5de2994
--- /dev/null
+++ b/scripts/bash_completion/pd
@@ -0,0 +1,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