mocp_add() {
if [ $SHUFFLE = 1 ]; then
- if [ -s "$selection" ]; then
+ if [ "$resp" = "y" ]; then
arr=$(tr '\0' '\n' < "$selection")
elif [ -n "$1" ]; then
arr="$1"
done
else
- if [ -s "$selection" ]; then
+ if [ "$resp" = "y" ]; then
xargs < "$selection" -0 mocp -a
else
mocp -a "$1"
exit
fi
+if [ -s "$selection" ]; then
+ echo -n "Work with selection? Enter 'y' to confirm: "
+ read resp
+fi
+
if [ -z "$ret" ]; then
# mocp not running
mocp -S
# clear selection and play
mocp -c
-mocp_add "$1"
+mocp_add "$1" "$resp"
mocp -p
# uncomment the line below to show mocp interface after appending