From d8f9c39ad21e6073fbc113872c6f0c6f7f05aaee Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Fri, 9 Feb 2024 22:35:29 +0800 Subject: [PATCH] gogrep: trim pwd --- .local/bin/gogrep | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local/bin/gogrep b/.local/bin/gogrep index b7b0def..2f26ae1 100755 --- a/.local/bin/gogrep +++ b/.local/bin/gogrep @@ -1,3 +1,4 @@ #!/usr/lib/9base/bin/rc -e ifs=' -' grep '--color=always' $* `{go list -deps -f '{{range .GoFiles}}{{printf "%s/%s\n" $.Dir .}}{{end}}' ./...} | sed 's|'^$home^'|~|' +' grep '--color=always' $* `{go list -deps -f '{{range .GoFiles}}{{printf "%s/%s\n" $.Dir .}}{{end}}' ./...} | + sed 's|'^`{pwd}^'/||;s|'^$home^'|~|' -- 2.43.0