On Fri, Jan 17, 2003 at 07:20:33PM +0530, Rahul Kumar wrote:
> > 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.
Yeah, my mistake.
> 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 ?
Your call, buddy. :)
> For java i would just pipe to sed, i.e. echo *.java | sed
> 's/.java//g' .
Explore the bash builtin compgen (and the array COMP_WORDS).
Binand
--
Russian Roulette with Unix:
while :; do kill $RANDOM &> /dev/null && break || sleep 1; done
-------------------------------------------------------
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