Skip to content

Commit

Permalink
add missing defaults that made me go on a pointless tangent elsewhere…
Browse files Browse the repository at this point in the history
… (smh)
  • Loading branch information
paperdev-code committed Jul 25, 2024
1 parent 48ef87a commit be57f96
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions modules/HM/nushell/env.nu
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,31 @@ $env.TRANSIENT_PROMPT_COMMAND = ""

# connect SSH agent (depends on a systemd service).
$env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)ssh-agent"

# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
$env.ENV_CONVERSIONS = {
"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) }
}
"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) }
}
}

# Directories to search for scripts when calling source or use
# The default for this is $nu.default-config-dir/scripts
$env.NU_LIB_DIRS = [
($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts
($nu.data-dir | path join 'completions') # default home for nushell completions
]

# Directories to search for plugin binaries when calling register
# The default for this is $nu.default-config-dir/plugins
$env.NU_PLUGIN_DIRS = [
($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins
]

0 comments on commit be57f96

Please sign in to comment.