Hi,
attached is a 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> as in:
$ ls LICENSE.txt README alt/ doc/ lib/ patch.pd sound.pat
$ pd <TAB><TAB> alt/ doc/ lib/ patch.pd sound.pat
$ pd -<TAB><TAB>
-32bit -audiooutdev -helppath -midioutdev -nomidiin -path -stdpath
-alsa -blocksize -inchannels -noadc -nomidiout -r -typeface
-alsaadd -channels -jack -noaudio -nostdpath -realtime -verbose
-alsamidi -d -lib -nodac -nrt -rt -version
-audiobuf -font -listdev -nogui -open -send
-audiodev -guicmd -mididev -noloadbang -oss -sleepgrain
-audioindev -guiport -midiindev -nomidi -outchannels -stderr
$ pd -al<TAB><TAB> -alsa -alsaadd -alsamidi
Later I might 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
The file also is in CVS at: /cvsroot/pure-data/scripts/bash_completion/pd
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo, shift8 hat gesagt: // shift8 wrote:
that's a really nice piece of work, Frank!
Thank you. The CVS version now also has directory completion for -path, -helppath and file completion for -open. I guess, that's it for now. Completing midi devices or soundcards would be possible, at least for ALSA, but probably not really worth the effort.
Frank Barknecht _ ______footils.org_ __goto10.org__