Browse Source

Add support for `mpv` short options

Matteo Savatteri 4 years ago
parent
commit
f6eacc7865
1 changed files with 1 additions and 1 deletions
  1. 1 1
      vaporget

+ 1 - 1
vaporget

@@ -83,7 +83,7 @@ handle_term()
 while getopts m: f; do
 	case $f in
 		m)
-			MPV_CMDLINE=$(echo "${OPTARG}" | sed -e 's/^ */--/' -e 's/, */ --/g')
+			MPV_CMDLINE=$(echo "${OPTARG}" | sed -e 's/[^,]\{2,\}/--& /g' -e 's/\(^\|,\)[a-zA-Z]\($\|,\)/ -& /g' -e 's/,//g')
 		;;
 	esac
 done