On Fri, Jan 17, 2003 at 05:02:07PM +0530, Binand Raj S. wrote:
> 
> On Thu, Jan 16, 2003 at 10:49:43AM +0530, Rahul Kumar wrote:
> > I specifically meant cases like: when doing javac, only a java file
> > should be completed, when doing java only the base portion should be
> > completed, when doing a "cd" only directories should be completed, when
> > doing a cat or less, only a text file etc.
> 
> I will help you with javac, you figure out java for yourself :)
> 
> function javac_complete() { shopt -s nullglob; COMPGEN=( $( echo *.java ) ); }
> complete -o default -F javac_complete javac
> 
Hi Binand,

acco to my bash (GNU bash, version 2.05.12(1)-release
(i386-asplinux-linux-gnu)), it was COMPREPLY not COMPGEN.

However, upon completion ALL .java files are shown, not just those
ending with my entries. Any ideas on getting the typed word into the
function ? 

For java i would just pipe to sed, i.e. echo *.java | sed
's/.java//g' .

However, i figured out the cd completion:

complete -o dirnames cd

thanks and regards
rahul



-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache 
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to