On Tue, Jan 5, 2010 at 11:57 AM, Max Kellermann <m...@duempel.org> wrote:

> On 2010/01/05 17:46, Jeff Frasca <phaed...@u.washington.edu> wrote:
> > When done in the completer code, it requires two extra fork()/exec()s of
> > the sed and sort code.  The sed and sort code are more general than we
> > would write, but they are also already debugged, and not that much more
> > overhead for something that runs no more than once or twice in a second,
> > and then only occasionally.
>
> mpc used to have (or still has?  I'm not sure) special commands for
> the bash completion.  That should be avoided if possible, because mpc
> shouldn't be bloated with interactive features.  mpc isn't supposed to
> be an interactive client, and I think bash+sed (as you said) might be
> well enough for implementing the completion.
>

It still does have a tab and lstab command.

For a short-term solution, it sounds like the currently implemented 'tab'
command could be modified.  Currently, it lists everything, then sees if
each individual thing is a match to the given partial name.  It could
instead list the dirname of the partial name and check for matches to the
basename of the partial name. This wouldn't add a ton of bloat, it seems.

For long-term... Clearly Jeff uses mpc as an interactive client, and I do as
well sometimes; we're probably not the only ones.  Mpc is really quite close
to an ideal command-line interactive client already, so what's the best
approach for adding any desired interactive features?  It's not just an
additional few commands - stuff like the globbing mentioned earlier would
modify existing commands.

Jeffrey
------------------------------------------------------------------------------
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