mirror of
https://github.com/nushell/nushell.git
synced 2024-11-07 17:14:23 +01:00
changed default env file to use $nu.home_path to find home (#10192)
# Description Changed the default env file so that home is found using `$nu.home-path` instead to using an if-else statement to find the os then find the specific environment variable
This commit is contained in:
parent
d28f728787
commit
844f541719
@ -3,14 +3,7 @@
|
||||
# version = "0.84.1"
|
||||
|
||||
def create_left_prompt [] {
|
||||
mut home = ""
|
||||
try {
|
||||
if $nu.os-info.name == "windows" {
|
||||
$home = $env.USERPROFILE
|
||||
} else {
|
||||
$home = $env.HOME
|
||||
}
|
||||
}
|
||||
let home = $nu.home-path
|
||||
|
||||
let dir = ([
|
||||
($env.PWD | str substring 0..($home | str length) | str replace $home "~"),
|
||||
|
Loading…
Reference in New Issue
Block a user