fetch

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

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

Fix sshd grep self-reference bug

Diffstat:
Mfetch | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fetch b/fetch @@ -58,7 +58,9 @@ _shell() { printf "$1" "$(readlink /proc/$PPID/exe)" } _sshd() { - sshd_pids=$(ps x | awk 'BEGIN{ORS=" "}; /sshd/{print $1}') + sshd_pids=$( + ps x | awk 'BEGIN {ORS=" "}; !/awk/ && /sshd/ {print $1}' + ) printf "$1" "${sshd_pids:---}" } _tmux() {