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
This commit is contained in:
Earnestly 2019-12-06 12:05:15 +00:00
parent 41a6a9b372
commit 521d3c92d0
1 changed files with 1 additions and 1 deletions

2
sx
View File

@ -19,7 +19,7 @@ cleanup() {
} }
stty=$(stty -g) stty=$(stty -g)
tty=$(ps -o tty= $$) tty=$(ps -o tty= -p $$)
tty=${tty#tty} tty=${tty#tty}
cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx