2023-01-30 11:32:07 -05:00
|
|
|
def create_left_prompt [] {
|
|
|
|
let path_segment = if (is-admin) {
|
|
|
|
$"(ansi red_bold)($env.PWD)"
|
|
|
|
} else {
|
|
|
|
$"(ansi green_bold)($env.PWD)"
|
|
|
|
}
|
|
|
|
|
|
|
|
$path_segment
|
|
|
|
}
|
|
|
|
|
|
|
|
def create_right_prompt [] {
|
|
|
|
let time_segment = ([
|
|
|
|
(date now | date format '%m/%d/%Y %r')
|
|
|
|
] | str join)
|
|
|
|
|
|
|
|
$time_segment
|
|
|
|
}
|
|
|
|
|
2023-07-30 14:40:44 -04:00
|
|
|
$env.PROMPT_COMMAND = {|| create_left_prompt }
|
|
|
|
$env.PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
|
|
|
|
$env.PROMPT_INDICATOR = {|| "〉" }
|
|
|
|
$env.PROMPT_INDICATOR_VI_INSERT = {|| ": " }
|
|
|
|
$env.PROMPT_INDICATOR_VI_NORMAL = {|| "〉" }
|
|
|
|
$env.PROMPT_MULTILINE_INDICATOR = {|| "::: " }
|
|
|
|
$env.ENV_CONVERSIONS = {
|
2023-01-30 11:32:07 -05:00
|
|
|
"PATH": {
|
|
|
|
from_string: { |s| $s | split row (char esep) | path expand -n }
|
|
|
|
to_string: { |v| $v | path expand -n | str join (char esep) }
|
|
|
|
}
|
|
|
|
"Path": {
|
|
|
|
from_string: { |s| $s | split row (char esep) | path expand -n }
|
|
|
|
to_string: { |v| $v | path expand -n | str join (char esep) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-30 14:40:44 -04:00
|
|
|
$env.NU_LIB_DIRS = [
|
2023-01-30 11:32:07 -05:00
|
|
|
($nu.config-path | path dirname | path join 'scripts')
|
|
|
|
]
|
|
|
|
|
2023-07-30 14:40:44 -04:00
|
|
|
$env.NU_PLUGIN_DIRS = [
|
2023-01-30 11:32:07 -05:00
|
|
|
($nu.config-path | path dirname | path join 'plugins')
|
2023-04-15 21:43:07 -04:00
|
|
|
]
|