From 521d3c92d05b98ba596e73ecbd7347cd107276e5 Mon Sep 17 00:00:00 2001 From: Earnestly Date: Fri, 6 Dec 2019 12:05:15 +0000 Subject: [PATCH] sx: correct the usage of ps There appears to be no indication according to the POSIX synopsis[1] of the ps command that it shall take a PID argument as positional. The rest of the document doesn't suggest such a case either. What the document does provide is the `-p' flag to specify a list of PIDs with which ps will narrow the results. 1. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html --- sx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sx b/sx index 21a675f..e2ac46d 100755 --- a/sx +++ b/sx @@ -19,7 +19,7 @@ cleanup() { } stty=$(stty -g) -tty=$(ps -o tty= $$) +tty=$(ps -o tty= -p $$) tty=${tty#tty} cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx