Search and Add to playlist

Hi,

Is there a way to add a song to the playlist once you search for it with the key g (I only manage to play it by pressing enter)?

Thank you.

I don't think you can exit the search with anything other than "ESC" or "ENTER", which doesn't give you a lot of options... maybe it would be good if "ESC" would retain the selection that you make during the search?

Personally, I just do all my searching elsewhere, since it's easy to add results to the playlist with

$ mocp -a somedirectory anotherdirectory somefile.ogg ...

so, for instance, you could have a script called "musicgrep" or something, that does this:

mocp -a $(find $HOME/mymusicdirectory *$1*)

or some more refined variation on that theme, depending on exactly how you want it to work. If you use Midnight Commander, you can pretty easily add selections from there, too, using the same basic idea. It's a nice action to add to the mc menu, since browsing and searching is much easier from there.

This also works even without the interface running.

Thank you for the quick answer. I'll try to play a bit with the scripts so that it does what I want.

Thank you.

Source: moc-2.5.0-beta1.tar

Patch for adding to playlist from search:
https://www.dropbox.com/s/zn2flhmf06j7482/moc-search-add-to-playlist.patch

Applying patch:
cd {extracted source folder}
patch -p0 -i "{patch folder}/moc-search-add-to-playlist.patch"

Right arrow key to add file or directory. ( will not override arrow key outside of search )