From 4c12418b625d38801d8881bf261592d1f3b13972 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Mon, 25 Aug 2025 13:54:41 +0200 Subject: [PATCH] git:track: Fix unnecessary subshell launch While at it, modify the formatting of the line above slightly. --- .config/zsh/autoload/git/git-track | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.config/zsh/autoload/git/git-track b/.config/zsh/autoload/git/git-track index 10e9dea..c4dbc93 100755 --- a/.config/zsh/autoload/git/git-track +++ b/.config/zsh/autoload/git/git-track @@ -22,9 +22,8 @@ git for-each-ref --format='%(upstream),%(refname)' refs/heads "${@/#/refs/remote s:,/:,:g s:(^|\n)([^,]+),\n\2:\1\2:g s:(^|\n)([^/,]*)([^\n]*\n\2(,|/))*:\n,\n&:g - s:\n,\n+$:\n: - ' \ - | (echo remote,local; cat) \ + s:\n,\n+$:\n:' \ + | { echo remote,local; cat; } \ | sed -E 's:(.*),(.*):\2,\1:g; s:^,: ,:; s:,$:, :' \ | column -ts, \ | sed '2d; 1{p;s/./―/g}'