fix(tui): normalize abbreviated home paths to forward slashes

This commit is contained in:
Dax Raad
2026-06-27 18:54:06 -04:00
parent 4741e3ee6b
commit cd942d0669
+2 -1
View File
@@ -5,5 +5,6 @@ export function abbreviateHome(input: string, home: string) {
const relative = path.relative(home, input)
if (relative === "") return "~"
if (relative === ".." || relative.startsWith(".." + path.sep) || path.isAbsolute(relative)) return input
return "~" + path.sep + relative
// Normalize to forward slashes so abbreviated display paths are identical across platforms.
return "~/" + relative.split(path.sep).join("/")
}