diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 13:26:51 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 13:26:51 +0200 |
| commit | 07c24054cab965800983ef40f53a05c2db131ede (patch) | |
| tree | 741db561d614b35f8f94fee04fb5ce663a629a0b /internal/engine/facts.go | |
| parent | 70dccf8d573028aaed64185acb8e134e5339afa3 (diff) | |
| download | krino-07c24054cab965800983ef40f53a05c2db131ede.tar.gz krino-07c24054cab965800983ef40f53a05c2db131ede.zip | |
krino: 0.0.3 — the plan as one block per file, wrapped, and -Pv0.0.3
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 ~.
Diffstat (limited to 'internal/engine/facts.go')
| -rw-r--r-- | internal/engine/facts.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) } |
