mirror of
https://github.com/nushell/nushell.git
synced 2025-04-26 22:28:19 +02: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"
|
# version = "0.84.1"
|
||||||
|
|
||||||
def create_left_prompt [] {
|
def create_left_prompt [] {
|
||||||
mut home = ""
|
let home = $nu.home-path
|
||||||
try {
|
|
||||||
if $nu.os-info.name == "windows" {
|
|
||||||
$home = $env.USERPROFILE
|
|
||||||
} else {
|
|
||||||
$home = $env.HOME
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let dir = ([
|
let dir = ([
|
||||||
($env.PWD | str substring 0..($home | str length) | str replace $home "~"),
|
($env.PWD | str substring 0..($home | str length) | str replace $home "~"),
|
||||||
|
Loading…
Reference in New Issue
Block a user