BASH completion

View: New views
3 Messages — Rating Filter:   Alert me  

BASH completion

by Bill Kendrick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I added a very basic BASH tab-completion file for Tux Paint.
It understands, more-or-less, all of the command-line options.
(So you can do, e.g., "tuxpaint --no[tab][tab]" to see all of the
default features you can turn off: sound, printing, etc.)

I'm not 100% clear on where to INSTALL the file, esp. in a multi-platform
(not just Linux/Unix/POSIX/whatever) way.  For now, the Makefile sticks it
in $(DESTDIR)/etc/bash_completion.d/   (Where "$DESTDIR" is usually just
used by packagers.)

That is, it does NOT consider "$PREFIX" (which, for a general user
installing from source, is usually "/usr/local/").  I did that because
BASH on my system (Kubuntu 9.04) doesn't seem to notice the existence
of a "/usr/local/etc/bash_completion.d/" directory.  And I couldn't find
any definitive way of figuring out what to stick in the Makefile.
(For our configuration file, we can stick it in /usr/local/etc/tuxpaint/
because we then TELL Tux Paint that that's where it is, via a "-D" (#define)
to the C compiler.)

Google searching mostly came up with BASH-related code and packaging.
(What I should do is poke around the source to Inkscape or Mplayer or
something.)  Someone on #bash IRC channel on freenode said /etc seemed fine.

And what I'm doing with the Windows target is based on what we do for CONFDIR.
("COMPLETIONDIR=win32/bdist" during the install step.)

No idea what to do, if anything, on Mac.  (I see lots of clues that
BASH tab completion can be utilized on OS X.  But I'll leave it to Martin
to figure out what to do with the file, and how to do it in the Xcode
project...?)


I happily accept patches to both the Makefile, and the completion file
( src/tuxpaint-completion.bash in CVS).

Thanks!

--
-bill!
Sent from my computer

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tuxpaint-devel mailing list
Tuxpaint-devel@...
https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel

Re: BASH completion

by Martin Fuhrer-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Wed, Sep 9, 2009 at 1:33 PM, Bill Kendrick <nbs@...> wrote:

No idea what to do, if anything, on Mac.  (I see lots of clues that
BASH tab completion can be utilized on OS X.  But I'll leave it to Martin
to figure out what to do with the file, and how to do it in the Xcode
project...?)


I'll look into it once I get my home Internet connection restored sometime next week (back from Beijing now)...

Martin


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tuxpaint-devel mailing list
Tuxpaint-devel@...
https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel

Re: BASH completion

by Bill Kendrick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Sep 11, 2009 at 01:41:19PM -0600, Martin Fuhrer wrote:
>    I'll look into it once I get my home Internet connection restored sometime
>    next week (back from Beijing now)...

Thanks!  And welcome back!!!


--
-bill!
Sent from my computer

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tuxpaint-devel mailing list
Tuxpaint-devel@...
https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel