> On Tue, 5 Jan 2010, Max Kellermann wrote:
>> The tab command should be disabled with --enable-mini.  It's unlikely
>> to be useful on those tiny platforms.

Alright, I've got a mockup of the 'mpc radd' code working.  It's
available at:

        git pull http://sasquatch-labs.org/git/mpc.git mpc-add-regex

(That repo has everything I've done merged in master, so pulling master 
from there should have the same effect.)

The tab helper and radd commands can be compile-time disabled with
--enable-mini.

radd adds all files that merely match, such that:
        mpc radd <pattern>

behaves similarly to:

        mpc listall | grep <pattern> | mpc add

mpc radd takes multiple regexs on the command line, and will only add a
matching file once.

There's some stub code in there for adding a '-e' switch to turn on
extended regexes, however, it has been #if 0'ed out because I haven't
worked out how to make it play nice like this:

        mpc radd -e

(Patterns are fed in on stdin).  I'm sure it is possible and not
terribly difficult, I just haven't fixed that bug yet--so it's commented
out for the time being.

The final thing I think I would like to add is a sort on the listall
output--right now, if I run:

        mpc radd Hendrix

I get all three albums interleaved (each track one plays, then each
track two plays, and so on--not so good when I do that with Devin
Townsend, who does his album mixes with continuous playback in mind).

But, I think I've got a decently stable code checkpoint.  So, here it
is.

If the "separate command" thing is bad, I can rework it, if there are
other design problems, again, this is a first iteration.  I toyed with
calling it 'mpc grep' instead of 'radd'.  The name is quite easily
changed.

Jeff

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to