38 lines
1.2 KiB
Nu
38 lines
1.2 KiB
Nu
$env.config.show_banner = false
|
|
$env.config.completions.case_sensitive = false
|
|
$env.config.completions.algorithm = "fuzzy"
|
|
$env.config.completions.quick = false
|
|
$env.config.completions.partial = true
|
|
|
|
source $"($nu.cache-dir)/carapace.nu"
|
|
use $"($nu.cache-dir)/starship.nu"
|
|
|
|
# direnv hook
|
|
$env.config = ($env.config? | default {})
|
|
$env.config.hooks = ($env.config.hooks? | default {})
|
|
$env.config.hooks.pre_prompt = (
|
|
$env.config.hooks.pre_prompt?
|
|
| default []
|
|
| append {||
|
|
direnv export json
|
|
| from json --strict
|
|
| default {}
|
|
| items {|key, value|
|
|
let value = do (
|
|
{
|
|
"PATH": {
|
|
from_string: {|s| $s | split row (char esep) | path expand --no-symlink }
|
|
to_string: {|v| $v | path expand --no-symlink | str join (char esep) }
|
|
}
|
|
}
|
|
| merge ($env.ENV_CONVERSIONS? | default {})
|
|
| get ([[value, optional, insensitive]; [$key, true, true] [from_string, true, false]] | into cell-path)
|
|
| if ($in | is-empty) { {|x| $x} } else { $in }
|
|
) $value
|
|
return [ $key $value ]
|
|
}
|
|
| into record
|
|
| load-env
|
|
}
|
|
)
|