From b6f230ddf97235d9551bcac7d7d36993dae7f9ac Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sat, 19 Jul 2025 00:58:01 +0300 Subject: [PATCH] CASE INSENSITIVE FILE"SYSTEM"S STRIKE AGAIN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $ "/etc" | path relative-to "/Etc" Error: nu::shell::cant_convert × Can't convert to prefix not found. ╭─[entry #8:1:1] 1 │ "/etc" | path relative-to "/Etc" · ───┬── · ╰── can't convert string to prefix not found ╰──── FUCK FUCK FUCK FUCK FUCK FUCK FUCK CURSE YOU APFS CURSE YOU APPLE CAN A MAN NOT HAVE GOOD SOFTWARE? --- modules/common/nushell/config.nu | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/common/nushell/config.nu b/modules/common/nushell/config.nu index 1420601..e80e59e 100644 --- a/modules/common/nushell/config.nu +++ b/modules/common/nushell/config.nu @@ -282,18 +282,23 @@ do --env { "" } + # https://github.com/nushell/nushell/issues/16205 + # + # Case insensitive filesystems strike again! + let pwd = pwd | path expand + let body = if ($jj_workspace_root | is-not-empty) { - let subpath = pwd | path relative-to $jj_workspace_root + let subpath = $pwd | path relative-to $jj_workspace_root let subpath = if ($subpath | is-not-empty) { $"(ansi magenta_bold) → (ansi reset)(ansi blue)($subpath)" } $"($hostname)(ansi light_yellow_bold)($jj_workspace_root | path basename)($subpath)(ansi reset)" } else { - let pwd = if (pwd | str starts-with $env.HOME) { - "~" | path join (pwd | path relative-to $env.HOME) + let pwd = if ($pwd | str starts-with $env.HOME) { + "~" | path join ($pwd | path relative-to $env.HOME) } else { - pwd + $pwd } $"($hostname)(ansi cyan)($pwd)(ansi reset)"