Skip to content

Commit

Permalink
Update mpvc
Browse files Browse the repository at this point in the history
  • Loading branch information
gmt4 committed Aug 19, 2024
1 parent 338b353 commit 2a98bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpvc
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ isInt() { printf '%d' "$1" >/dev/null 2>&1 && [ -n "$1" ]; }

mpvc_tty_size() {
# this is convoluted as mpvc is run as cgi by mpvc-web without an actual tty
ttydev="${ttydev:-$(if tty -s; then tty; else ps -hp $$ -o tty | awk '{sub("^","/dev/");l=$0} END{print l}'; fi)}"
ttydev="${ttydev:-$(if tty -s; then tty; else ps -hp $$ -o tty | awk '{sub("^","/dev/");gsub(" ","");l=$0} END{print l}'; fi)}"
ttysize=${ttysize:-$(equiet stty -F "$ttydev" size || equiet stty -f "$ttydev" size || equiet stty size || stty)}
echo "$ttysize"

Expand Down

0 comments on commit 2a98bff

Please sign in to comment.