mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 22:57:46 +00:00
Fix undetected windows enviroment (#312)
This commit is contained in:
parent
cb5f2627db
commit
c3abd6439c
1 changed files with 2 additions and 2 deletions
|
@ -239,7 +239,7 @@ def get_color [name, mode] {
|
|||
def home_abbrev [os_name] {
|
||||
let is_home_in_path = ($env.PWD | str starts-with $nu.home-path)
|
||||
if $is_home_in_path {
|
||||
if ($os_name == "Windows") {
|
||||
if ($os_name == "windows") {
|
||||
let home = ($nu.home-path | str replace -a '\\' '/')
|
||||
let pwd = ($env.PWD | str replace -a '\\' '/')
|
||||
$pwd | str replace $home '~'
|
||||
|
@ -432,4 +432,4 @@ def get_prompt [color_mode] {
|
|||
left_prompt: $left_prompt
|
||||
right_prompt: $right_prompt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue