Yeah, I noticed a similar thing the other day with the javac and java  
commands.

Depending on which program I'm using, tab-completion works out whether  
to select the source file or class file, and whatsmore it knows not to  
add the .class extension to the classfile.

Absolutely brilliant.

Andy

On 1 Jul 2009, at 11:04, Tim Allen wrote:

> Hi All
>
> Just had a taste of the effort that's gone in to Bash completion (this
> on Debian Etch):
>
>
> In a directory with a bunch of .c and .h files, including file1.c and
> file1.h. Files under cvs version control.
>
>
> rm file1.c
>
> cvs delete fi (TAB for completion) gives
>
> cvs delete file1.c  (Bemusement - I was expecting file1.h, and needing
> to backspace the h to c)
>
> cvs add fi (TAB for completion) gives
>
> cvs add file1.h  !!
>
>
> Pretty amazing. Played with touching/deleting a couple of dummy files,
> don't get same effect, so I guess bash is going down into the
> CVS/Entries file. /etc/bash_completion is 200+K long - lot of stuff in
> there on all the common commands.
>
>
> Cheers
>
> Tim
>
> -- 
> Next meeting: Dorchester, Tuesday 2009-07-07 20:00
> Dorset LUG: http://dorset.lug.org.uk/
> Chat: http://www.mibbit.com/?server=irc.blitzed.org&channel=%23dorset
> List info: https://mailman.lug.org.uk/mailman/listinfo/dorset


-- 
Next meeting: Dorchester, Tuesday 2009-07-07 20:00
Dorset LUG: http://dorset.lug.org.uk/
Chat: http://www.mibbit.com/?server=irc.blitzed.org&channel=%23dorset
List info: https://mailman.lug.org.uk/mailman/listinfo/dorset

Reply via email to