#!/bin/bash

song=$(mpc --format "%artist%\t%title%\t%position%" playlist | sort | column -s"	" -t | fzf --no-hscroll)

if [ "$song" == "" ]
then
	exit
fi

mpc play $(echo $song | awk '{print $NF}')