Christopher Sawtell wrote:
On Sat, Sep 13, 2008 at 4:08 PM, Jim Cheetham <[EMAIL PROTECTED]> wrote:
I haven't played with them, but looking at /etc/bash_completion, it
seems to be something like
complete -f -X '!*.image' squeak
That passes simple testing from my shell ...
I fear that the bash manual pape and the file
/usr/share/doc/bash/README.bash_completion.gz
indicate that it's just a tad more complex than that.
Actually, all I needed to add to that was -o dirnames, so it considers
directories to be possible completions. So the line I added to my .bashrc
file was...
complete -o dirnames -f -X '!*.image' squeak
...but this doesn't work perfectly: if there's a *.image file in whatever
directory your completion's at, then it TAB will put that on the command line,
even if there are directories there as well. But it's good enough for me.
Thanks,
Aidan