From d4e10c871bc39104c8dbbd9af229a910df1fc357 Mon Sep 17 00:00:00 2001 From: prez Date: Sat, 15 Feb 2020 14:04:43 +0100 Subject: [PATCH] sx: portability --- sx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sx b/sx index e2ac46d..528750b 100755 --- a/sx +++ b/sx @@ -19,8 +19,8 @@ cleanup() { } stty=$(stty -g) -tty=$(ps -o tty= -p $$) -tty=${tty#tty} +tty=$(tty) +tty=${tty#/dev/tty} cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx datadir=${XDG_DATA_HOME:-$HOME/.local/share}/sx