Skip to content

Instantly share code, notes, and snippets.

@rkitover
Created August 2, 2022 23:28
Show Gist options
  • Save rkitover/65c1830f9f94cbf434fe20efbce1286a to your computer and use it in GitHub Desktop.
Save rkitover/65c1830f9f94cbf434fe20efbce1286a to your computer and use it in GitHub Desktop.
pwsh function to play a cd from a collection
function ttf {
$cds = gci ~/Music/Tunnel*/*"_$($args[0])-"*/*.mp3
$i = 1
$choices = $cds | %{ '&' + $i++ + " - $($_.name)" }
$picked = $host.ui.promptforchoice('CD to play:', "`n", $choices, 0)
mpv $cds[$picked]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment