at main 1.8 kB view raw
1# Nushell Environment Config File 2 3# Set default editor 4$env.config.buffer_editor = "helix" 5 6# Remove welcome message 7$env.config.show_banner = false 8 9mkdir ($nu.data-dir | path join "vendor/autoload") 10starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu") 11 12# Specifies how environment variables are: 13# - converted from a string to a value on Nushell startup (from_string) 14# - converted from a value back to a string when running external commands (to_string) 15# Note: The conversions happen *after* config.nu is loaded 16$env.ENV_CONVERSIONS = { 17 "PATH": { 18 from_string: { |s| $s | split row (char esep) | path expand --no-symlink } 19 to_string: { |v| $v | path expand --no-symlink | str join (char esep) } 20 } 21 "Path": { 22 from_string: { |s| $s | split row (char esep) | path expand --no-symlink } 23 to_string: { |v| $v | path expand --no-symlink | str join (char esep) } 24 } 25} 26 27# Directories to search for scripts when calling source or use 28# The default for this is $nu.default-config-dir/scripts 29$env.NU_LIB_DIRS = [ 30 ($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts 31] 32 33# Directories to search for plugin binaries when calling register 34# The default for this is $nu.default-config-dir/plugins 35$env.NU_PLUGIN_DIRS = [ 36 ($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins 37] 38 39# Various paths 40$env.CARGO_HOME = ($env.HOME | path join ".cargo") 41 42# PATH 43use std "path add" 44path add ($env.CARGO_HOME | path join "bin") 45path add ($env.HOME | path join "go" "bin") 46path add ($env.HOME | path join "bin") 47path add ($env.HOME | path join ".local" "bin") 48path add /usr/bin 49path add /usr/sbin 50path add /usr/local/bin 51$env.PATH = ($env.PATH | uniq)