fix(tui): normalize abbreviated home paths to forward slashes
This commit is contained in:
@@ -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("/")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user