commit a513608
hovercats
·
2026-08-17 04:03:08 +0000 UTC
parent db41e8b
properly quote args using =, so that we can use the variable as intentended
1 files changed,
+2,
-2
M
ampv
M
ampv
+2,
-2
1@@ -5,10 +5,10 @@ socketpath=/tmp/.mpvsocket
2
3 switch($1) {
4 case start
5- mpv --idle '--input-ipc-server=/tmp/.mpvsocket' &
6+ mpv --idle '--input-ipc-server='$socketpath &
7 case play
8 shift
9- mpv --no-audio-display '--input-ipc-server=/tmp/.mpvsocket' $*
10+ mpv --no-audio-display '--input-ipc-server='$socketpath $*
11 case pause
12 printf 'cycle pause\n' | nc -UN $socketpath
13 case next