0

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

rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
olleicua
  • 2,039
  • 2
  • 21
  • 33

1 Answers1

0

I came up with the following zsh function:

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

the #i here makes it case insensitive

olleicua
  • 2,039
  • 2
  • 21
  • 33