commit 85d76eda80f09b717b57fa376b64e7655790d1e9 parent 96fdce8824fee602f1f42ca1b167df1c4b2024d8 Author: Byron Torres <b@torresjrjr.com> Date: Sat, 10 Apr 2021 01:23:58 +0100 Improve _tmux(), underline attached tmux sessions Diffstat:
M | fetch | | | 10 | +++++----- |
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fetch b/fetch @@ -66,12 +66,12 @@ _sshd() { } _tmux() { ps ax | grep -v 'grep' | grep -q 'tmux' && tmux_sessions=$( - tmux ls | paste -s | sed " - s/ windows (created[^)]*)//g - s/(attached)/$ul@$c0/g + tmux ls | sed " + s/ windows (created [^)]*)// + s/\([^(]*\)(attached)/$ul\1$c0/ s/ //g - s/\t/ /g - " + s/$/ / + " | tr -d '\n' ) printf "$1" "${tmux_sessions:---}" }