diff --git a/nushell/modules/pj_prompt.nu b/nushell/modules/pj_prompt.nu index 317a3c4..62ea9b5 100644 --- a/nushell/modules/pj_prompt.nu +++ b/nushell/modules/pj_prompt.nu @@ -1,5 +1,5 @@ def _pj_detect_os_key [] { - let host_name = (((sys host | get name?) | default ($nu.os-info.name? | default "")) | into string | str downcase) + let host_name = (((sys host | get name?) | default ($nu.os-info.name? | default "")) | into string | str lowercase) if ($host_name | str contains "darwin") { return "Macos" } @@ -18,7 +18,7 @@ def _pj_detect_os_key [] { if ($os_release != "") { let id_line = (open $os_release | lines | where {|l| $l | str starts-with "ID=" } | get 0?) let id = if ($id_line == null) { "" } else { (($id_line | str replace "ID=" "") | str trim -c '"') } - match ($id | str downcase) { + match ($id | str lowercase) { "alpine" => "Alpine" "alma" => "AlmaLinux" "almalinux" => "AlmaLinux" @@ -506,7 +506,7 @@ def _pj_git_branch_module [p: record, git: record] { # # lowercase extensions is checked per-language below. glob is # # case-insensitive on Windows, so *.CPP is matched by "cpp" too. # let exts = (glob *.{c,h,cpp,cc,cxx,hpp,hh,hxx,rs,zig,py} -# | each {|f| $f | path parse | get extension | str downcase } +# | each {|f| $f | path parse | get extension | str lowercase } # | uniq) # # let has_c = ("c" in $exts or "h" in $exts) @@ -585,7 +585,7 @@ def _pj_prompt_static_base [] { let host = (sys host | get hostname? | default "") let in_ssh = (($env.SSH_CONNECTION? | default "") != "" or ($env.SSH_TTY? | default "") != "") - # let prompt_newline = if (($nu.os-info.name | str downcase) == "windows") { "\n\r" } else { "\n\r" } + # let prompt_newline = if (($nu.os-info.name | str lowercase) == "windows") { "\n\r" } else { "\n\r" } let prompt_newline = "\n\r" { diff --git a/nushell/modules/pj_uv.nu b/nushell/modules/pj_uv.nu index 2ff2852..f53563b 100644 --- a/nushell/modules/pj_uv.nu +++ b/nushell/modules/pj_uv.nu @@ -1,5 +1,5 @@ export def --env "pj uvthu" [] { - let os_name = ($nu.os-info.name? | default "" | into string | str downcase) + let os_name = ($nu.os-info.name? | default "" | into string | str lowercase) if not (($os_name | str contains "darwin") or ($os_name | str contains "macos")) { return } diff --git a/nushell/modules/pj_zoxide.nu b/nushell/modules/pj_zoxide.nu index 862e09b..6f0c3b2 100644 --- a/nushell/modules/pj_zoxide.nu +++ b/nushell/modules/pj_zoxide.nu @@ -42,7 +42,7 @@ export-env { # def _pj_normalize_windows_drive [path: string] { - if (($nu.os-info.name | str downcase) != "windows") { + if (($nu.os-info.name | str lowercase) != "windows") { return $path } @@ -52,7 +52,7 @@ def _pj_normalize_windows_drive [path: string] { } let item = ($parsed | first) - $"(($item.drive | str upcase)):($item.rest)" + $"(($item.drive | str uppercase)):($item.rest)" } # Jump to a directory using only keywords.