mirror of
https://github.com/RGBCube/ncc
synced 2025-07-28 10:37:44 +00:00
CASE INSENSITIVE FILE"SYSTEM"S STRIKE AGAIN
$ "/etc" | path relative-to "/Etc"
Error: nu:🐚: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?
This commit is contained in:
parent
ab464ce6f1
commit
b6f230ddf9
1 changed files with 9 additions and 4 deletions
|
@ -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)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue