Browse Source

Fix `getopts` formatting

Matteo Savatteri 4 years ago
parent
commit
13aa7f84b1
1 changed files with 7 additions and 2 deletions
  1. 7 2
      vaporget

+ 7 - 2
vaporget

@@ -78,14 +78,19 @@ handle_term()
 ###############################################################################
 # MAIN SECTION                                                                #
 ###############################################################################
+
+# Parse command line
 while getopts m: f; do
 	case $f in
-		m)      MPV_CMDLINE=$(echo "${OPTARG}" | sed -e 's/^ */--/' -e 's/, */ --/g');;
+		m)
+			MPV_CMDLINE=$(echo "${OPTARG}" | sed -e 's/^ */--/' -e 's/, */ --/g')
+		;;
 	esac
 done
 shift `expr $OPTIND - 1`
 
-trap handle_term TERM	# Use our custom handler for the TERM signal
+# Use our custom handler for the TERM signal
+trap handle_term TERM
 
 # Fetch the artist list from the website and let the user select from a menu
 CHOICES=$(get_library "${WEBSITE}" | select_artist_list "${WEBSITE}")