config

NixOS config
Log | Files | Refs | README | LICENSE

commit 34ccb536e6370d84baf5d3d75af7fae7ff3fd293 (tree)
parent 9ef590ed512353376280c618d8a7a9d8b94479d6
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date:   Fri, 21 Jun 2024 08:58:16 +0300

gg: sort duplicate entries

Diffstat:
Mshared/home/gg.sh | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shared/home/gg.sh b/shared/home/gg.sh @@ -33,7 +33,7 @@ g() { local pkg_candidates local _gopath _gopath=$(git rev-parse --show-toplevel) - pkg_candidates="$( (cd "$_gopath" && find . m3/src -mindepth 1 -maxdepth ${_GG_MAXDEPTH} -type d -path "*/$1" -and -not -path '*/vendor/*' -print) | sed 's/^\.\///g')" + pkg_candidates="$( (cd "$_gopath" && find . m3/src -mindepth 1 -maxdepth ${_GG_MAXDEPTH} -type d -path "*/$1" -and -not -path '*/vendor/*' -print) | sed 's/^\.\///g' | sort -u)" echo "$pkg_candidates" | awk '{print length, $0 }' | sort -n | awk '{print $2}' } #