Add `programs.nushell.abbreviations`, mirroring `shellAliases`, to
declaratively configure fish-style abbreviations (nushell 0.113.0+).
The set is emitted as `$env.config.abbreviations = { ... }` after the
aliases so it survives a wholesale `$env.config = { ... }` written in
`extraConfig`.
Unlike aliases, abbreviations expand inline in the line editor, so the
expanded command is what ends up in history.
36 lines
No EOL
684 B
Text
36 lines
No EOL
684 B
Text
load-env {
|
|
"ENV_CONVERSIONS": {
|
|
"PATH": {
|
|
"from_string": ({|s| $s | split row (char esep) })
|
|
"to_string": ({|v| $v | str join (char esep) })
|
|
}
|
|
}
|
|
"FOO": "BAR"
|
|
"LIST_VALUE": [
|
|
"foo"
|
|
"bar"
|
|
]
|
|
"PROMPT_COMMAND": ({|| "> "})
|
|
}
|
|
|
|
$env.config.display_errors.exit_code = false
|
|
$env.config.hooks.pre_execution = [
|
|
({|| "pre_execution hook"})
|
|
]
|
|
$env.config.show_banner = false
|
|
|
|
let config = {
|
|
filesize_metric: false
|
|
table_mode: rounded
|
|
use_ls_colors: true
|
|
}
|
|
|
|
|
|
alias "ll" = ls -a
|
|
alias "multi word alias" = cd -
|
|
alias "z" = __zoxide_z
|
|
|
|
$env.config.abbreviations = {
|
|
"gs": "git status"
|
|
"ll": "ls -l"
|
|
} |