Skip to content

Commit

Permalink
fix: correctly handle play command
Browse files Browse the repository at this point in the history
  • Loading branch information
rockymadden committed May 29, 2018
1 parent 367454d commit 8f57310
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/somafm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ while (( "$#" )); do
-q*) quality=${2}; shift; shift ;;
*)
case "${cmd}" in
listen) test -n "${1}" && test -z "${channel}" && channel=${1} ;;
listen|play) test -n "${1}" && test -z "${channel}" && channel=${1} ;;
esac
shift
;;
Expand All @@ -24,12 +24,12 @@ done

## Default arguments and options ##################################################################
case "${cmd}" in
listen) test -z "${quality}" && quality=high ;;
listen|play) test -z "${quality}" && quality=high ;;
esac

## Argument and option prompting ##################################################################
case "${cmd}" in
listen)
listen|play)
test -z "${channel}" && \
read -e -p 'Enter channel (e.g. groovesalad, defcon, poptron): ' channel
;;
Expand Down

0 comments on commit 8f57310

Please sign in to comment.