feat(nushell): add some config options
This commit is contained in:
parent
3e73149133
commit
d2eaf9c064
2 changed files with 29 additions and 11 deletions
|
@ -20,3 +20,12 @@
|
||||||
mkdir ($nu.data-dir | path join "vendor/autoload")
|
mkdir ($nu.data-dir | path join "vendor/autoload")
|
||||||
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
|
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
|
||||||
zoxide init nushell | save -f ($nu.data-dir | path join "vendor/autoload/zoxide.nu")
|
zoxide init nushell | save -f ($nu.data-dir | path join "vendor/autoload/zoxide.nu")
|
||||||
|
|
||||||
|
# A bit more advanced alias for `nh os`
|
||||||
|
def nos [flags]: nothing -> nothing {
|
||||||
|
help nos
|
||||||
|
}
|
||||||
|
|
||||||
|
def "nos switch" []: nothing -> nothing {
|
||||||
|
nh os switch
|
||||||
|
}
|
||||||
|
|
|
@ -17,17 +17,26 @@
|
||||||
# You can remove these comments if you want or leave
|
# You can remove these comments if you want or leave
|
||||||
# them for future reference.
|
# them for future reference.
|
||||||
|
|
||||||
$env.config = {
|
def co
|
||||||
hooks: {
|
|
||||||
pre_prompt: [{ ||
|
|
||||||
if (which direnv | is-empty) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
direnv export json | from json | default {} | load-env
|
$env = {
|
||||||
if 'ENV_CONVERSIONS' in $env and 'PATH' in $env.ENV_CONVERSIONS {
|
config = {
|
||||||
$env.PATH = do $env.ENV_CONVERSIONS.PATH.from_string $env.PATH
|
hooks: {
|
||||||
}
|
pre_prompt: [{ ||
|
||||||
}]
|
if (which direnv | is-empty) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
direnv export json | from json | default {} | load-env
|
||||||
|
if 'ENV_CONVERSIONS' in $env and 'PATH' in $env.ENV_CONVERSIONS {
|
||||||
|
$env.PATH = do $env.ENV_CONVERSIONS.PATH.from_string $env.PATH
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
table: {
|
||||||
|
mode = "heavy"
|
||||||
|
}
|
||||||
|
show_banner: false
|
||||||
}
|
}
|
||||||
|
LS_COLOURS = ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue