Вопрос

I recently switched from Mac OSX to Ubuntu and copied all of my music over so it had the iTunes style directory structure and I wanted to be able to type something like:

$ music abbey road

at the command line and hear the album on shuffle or equivalently

$ music beatles

and hear all of the music I have by that artist

Это было полезно?

Решение

I came up with the following zsh function:

function music() {
  mplayer $HOME/Music/**/*(#i)("$*")*/**/* -shuffle
}

the #i here makes it case insensitive

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top