|
|
@ -13,21 +13,21 @@ def create_left_prompt [] {
|
|
|
|
def create_right_prompt [] {
|
|
|
|
def create_right_prompt [] {
|
|
|
|
let time_segment = ([
|
|
|
|
let time_segment = ([
|
|
|
|
(date now | date format '%m/%d/%Y %r')
|
|
|
|
(date now | date format '%m/%d/%Y %r')
|
|
|
|
] | str collect)
|
|
|
|
] | str join)
|
|
|
|
|
|
|
|
|
|
|
|
$time_segment
|
|
|
|
$time_segment
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Use nushell functions to define your right and left prompt
|
|
|
|
# Use nushell functions to define your right and left prompt
|
|
|
|
let-env PROMPT_COMMAND = { create_left_prompt }
|
|
|
|
let-env PROMPT_COMMAND = {|| create_left_prompt }
|
|
|
|
let-env PROMPT_COMMAND_RIGHT = { create_right_prompt }
|
|
|
|
let-env PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
|
|
|
|
|
|
|
|
|
|
|
|
# The prompt indicators are environmental variables that represent
|
|
|
|
# The prompt indicators are environmental variables that represent
|
|
|
|
# the state of the prompt
|
|
|
|
# the state of the prompt
|
|
|
|
let-env PROMPT_INDICATOR = { "〉" }
|
|
|
|
let-env PROMPT_INDICATOR = {|| "〉" }
|
|
|
|
let-env PROMPT_INDICATOR_VI_INSERT = { ": " }
|
|
|
|
let-env PROMPT_INDICATOR_VI_INSERT = {|| ": " }
|
|
|
|
let-env PROMPT_INDICATOR_VI_NORMAL = { "〉" }
|
|
|
|
let-env PROMPT_INDICATOR_VI_NORMAL = {|| "〉" }
|
|
|
|
let-env PROMPT_MULTILINE_INDICATOR = { "::: " }
|
|
|
|
let-env PROMPT_MULTILINE_INDICATOR = {|| "::: " }
|
|
|
|
|
|
|
|
|
|
|
|
# Specifies how environment variables are:
|
|
|
|
# Specifies how environment variables are:
|
|
|
|
# - converted from a string to a value on Nushell startup (from_string)
|
|
|
|
# - converted from a string to a value on Nushell startup (from_string)
|
|
|
@ -36,11 +36,11 @@ let-env PROMPT_MULTILINE_INDICATOR = { "::: " }
|
|
|
|
let-env ENV_CONVERSIONS = {
|
|
|
|
let-env ENV_CONVERSIONS = {
|
|
|
|
"PATH": {
|
|
|
|
"PATH": {
|
|
|
|
from_string: { |s| $s | split row (char esep) | path expand -n }
|
|
|
|
from_string: { |s| $s | split row (char esep) | path expand -n }
|
|
|
|
to_string: { |v| $v | path expand -n | str collect (char esep) }
|
|
|
|
to_string: { |v| $v | path expand -n | str join (char esep) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"Path": {
|
|
|
|
"Path": {
|
|
|
|
from_string: { |s| $s | split row (char esep) | path expand -n }
|
|
|
|
from_string: { |s| $s | split row (char esep) | path expand -n }
|
|
|
|
to_string: { |v| $v | path expand -n | str collect (char esep) }
|
|
|
|
to_string: { |v| $v | path expand -n | str join (char esep) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|