fetch

A MSYS2-compatible sys-info prompt
Log | Files | Refs | README | LICENSE

commit d460f862e3ff0ff3b7870011fd795f4f0d37c306
parent 81812e87b8e018ea22a38f4a0cd76080196f2423
Author: Byron Torres <b@torresjrjr.com>
Date:   Thu, 18 Feb 2021 21:13:18 +0000

Use ps flags ax

Diffstat:
Mfetch | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fetch b/fetch @@ -59,12 +59,12 @@ _shell() { } _sshd() { sshd_pids=$( - ps x | awk 'BEGIN {ORS=" "}; !/awk/ && /sshd/ {print $1}' + ps ax | awk 'BEGIN {ORS=" "}; !/awk/ && /sshd/ {print $1}' ) printf "$1" "${sshd_pids:---}" } _tmux() { - ps a | grep -v 'grep' | grep -q 'tmux' && tmux_sessions=$( + ps ax | grep -v 'grep' | grep -q 'tmux' && tmux_sessions=$( tmux ls \ | sed \ -e 's/(created[^)]*)//' -e 's/(attached)/@/' \