Pregunta

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

¿Fue útil?

Solución

I came up with the following zsh function:

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

the #i here makes it case insensitive

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top