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 :)
Stick this into your bash profile:
function javac_complete() { shopt -s nullglob; COMPGEN=( $( echo *.java ) ); }
complete -o default -F javac_complete javac
(generating completions for java is probably a bit more complex)
For cd etc., read bash(1) - especially the "Programmable Completions"
section.
HTH,
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