From 07c24054cab965800983ef40f53a05c2db131ede Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 14 Sep 2026 13:26:51 +0200 Subject: krino: 0.0.3 — the plan as one block per file, wrapped, and -P MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each file shows its steps, then the rule and the reason it matched, one field per line; on a terminal every line wraps to its width with continuation lines under their own column, and piped output is never wrapped. Choosing per file shows the same block. -P / --no-pager prints the plan without the pager. A duplicate's original is shown with ~. --- internal/engine/facts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/engine/facts.go') diff --git a/internal/engine/facts.go b/internal/engine/facts.go index 423bfd9..5790e95 100644 --- a/internal/engine/facts.go +++ b/internal/engine/facts.go @@ -185,11 +185,11 @@ func (f *facts) Duplicate(dirs []string) (string, bool, error) { } // displayOriginal reports orig relative to root when it lies inside root, -// else as an absolute path. +// else home-abbreviated (xdg.Abbrev), as every other user-visible path is. func displayOriginal(orig, root string) string { rel, err := filepath.Rel(root, orig) if err != nil || rel == ".." || strings.HasPrefix(rel, ".."+string(filepath.Separator)) { - return orig + return xdg.Abbrev(orig) } return filepath.ToSlash(rel) } -- cgit v1.3