fetch

MSYS2-compatible system info prompt
git clone https://git.torresjrjr.com/fetch.git
Log | Files | Refs | README | LICENSE

commit ab8942c1afca6f01f79d2c1f49486af2fa30476f
parent 015c94bcd508cd0fa74ed9eb6dfcd8d60a447e68
Author: Byron Torres <b@torresjrjr.com>
Date:   Sun,  1 Aug 2021 12:54:38 +0100

Use portable 'comm', not 'cmd', in ps formatting

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

diff --git a/fetch b/fetch @@ -59,11 +59,11 @@ _shell() { printf "$1" "$(readlink /proc/$PPID/exe)" } _sshd() { - pids=$(ps axc -o 'pid,cmd' | awk '/sshd/{printf $1 " "}') + pids=$(ps axc -o 'pid,comm' | awk '/sshd/{printf $1 " "}') printf "$1" "${pids:---}" } _tmux() { - ps axc -o 'cmd' | grep -q 'tmux: server' && tmux_sessions=$( + ps axc -o 'comm' | grep -q 'tmux: server' && tmux_sessions=$( tmux ls -F "#{session_created} #{?session_attached,$ul,}#S:#{session_windows}$c0" \ | sort \ | awk '{printf $2 " "}' \