|
|
@ -1,6 +1,9 @@
|
|
|
|
# Nushell Config File
|
|
|
|
# Nushell Sample Config File
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# version = "0.99.2"
|
|
|
|
# Warning: This file is intended for documentation purposes only and
|
|
|
|
|
|
|
|
# is not intended to be used as an actual configuration file as-is.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# version = "0.100.1"
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# A `config.nu` file is used to override default Nushell settings,
|
|
|
|
# A `config.nu` file is used to override default Nushell settings,
|
|
|
|
# define (or import) custom commands, or run any other startup tasks.
|
|
|
|
# define (or import) custom commands, or run any other startup tasks.
|
|
|
@ -86,14 +89,14 @@ $env.config.recursion_limit = 50
|
|
|
|
# ---------------------------
|
|
|
|
# ---------------------------
|
|
|
|
|
|
|
|
|
|
|
|
# edit_mode (string) "vi" or "emacs" sets the editing behavior of Reedline
|
|
|
|
# edit_mode (string) "vi" or "emacs" sets the editing behavior of Reedline
|
|
|
|
edit_mode: "emacs"
|
|
|
|
$env.config.edit_mode = "emacs"
|
|
|
|
|
|
|
|
|
|
|
|
# Command that will be used to edit the current line buffer with Ctrl+O.
|
|
|
|
# Command that will be used to edit the current line buffer with Ctrl+O.
|
|
|
|
# If unset, uses $env.VISUAL and then $env.EDITOR
|
|
|
|
# If unset, uses $env.VISUAL and then $env.EDITOR
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Tip: Set to "editor" to use the default editor on Unix platforms using
|
|
|
|
# Tip: Set to "editor" to use the default editor on Unix platforms using
|
|
|
|
# the Alternatives system or equivalent
|
|
|
|
# the Alternatives system or equivalent
|
|
|
|
buffer_editor: "editor"
|
|
|
|
$env.config.buffer_editor = "editor"
|
|
|
|
|
|
|
|
|
|
|
|
# cursor_shape_* (string)
|
|
|
|
# cursor_shape_* (string)
|
|
|
|
# -----------------------
|
|
|
|
# -----------------------
|
|
|
@ -145,7 +148,7 @@ $env.config.completions.use_ls_colors = true
|
|
|
|
# completions.external.*: Settings related to completing external commands
|
|
|
|
# completions.external.*: Settings related to completing external commands
|
|
|
|
# and additional completers
|
|
|
|
# and additional completers
|
|
|
|
|
|
|
|
|
|
|
|
# external.exnable (bool)
|
|
|
|
# external.enable (bool)
|
|
|
|
# true: search for external commands on the Path
|
|
|
|
# true: search for external commands on the Path
|
|
|
|
# false: disabling might be desired for performance if your path includes
|
|
|
|
# false: disabling might be desired for performance if your path includes
|
|
|
|
# directories on a slower filesystem
|
|
|
|
# directories on a slower filesystem
|
|
|
@ -206,8 +209,8 @@ $env.config.shell_integration.osc9_9 = false
|
|
|
|
# osc8 (bool):
|
|
|
|
# osc8 (bool):
|
|
|
|
# When true, the `ls` command will generate clickable links that can be launched in another
|
|
|
|
# When true, the `ls` command will generate clickable links that can be launched in another
|
|
|
|
# application by the terminal.
|
|
|
|
# application by the terminal.
|
|
|
|
# Note: This setting replaces the now deprecated `ls.show_clickable_links`
|
|
|
|
# Note: This setting replaces the now deprecated `ls.clickable_links`
|
|
|
|
$env.config.shell.integration.osc8: true
|
|
|
|
$env.config.shell_integration.osc8 = true
|
|
|
|
|
|
|
|
|
|
|
|
# Deprecated
|
|
|
|
# Deprecated
|
|
|
|
# $env.config.ls.clickable_links = true
|
|
|
|
# $env.config.ls.clickable_links = true
|
|
|
@ -389,7 +392,7 @@ $env.config.float_precision = 2
|
|
|
|
# ls.use_ls_colors (bool):
|
|
|
|
# ls.use_ls_colors (bool):
|
|
|
|
# true: The `ls` command will apply the $env.LS_COLORS standard to filenames
|
|
|
|
# true: The `ls` command will apply the $env.LS_COLORS standard to filenames
|
|
|
|
# false: Filenames in the `ls` table will use the color_config for strings
|
|
|
|
# false: Filenames in the `ls` table will use the color_config for strings
|
|
|
|
$env.config.ls = true
|
|
|
|
$env.config.ls.use_ls_colors = true
|
|
|
|
|
|
|
|
|
|
|
|
# Hooks
|
|
|
|
# Hooks
|
|
|
|
# -----
|
|
|
|
# -----
|
|
|
@ -402,12 +405,19 @@ $env.config.ls = true
|
|
|
|
# WARNING: A malformed display_output hook can suppress all Nushell output to the terminal.
|
|
|
|
# WARNING: A malformed display_output hook can suppress all Nushell output to the terminal.
|
|
|
|
# It can be reset by assigning an empty string as below:
|
|
|
|
# It can be reset by assigning an empty string as below:
|
|
|
|
|
|
|
|
|
|
|
|
$env.config.hooks.pre_prompt = [] # Before each prompt is displayed
|
|
|
|
# Before each prompt is displayed
|
|
|
|
$env.config.hooks.pre_execution = [] # After <enter> is pressed; before the commandline
|
|
|
|
$env.config.hooks.pre_prompt = []
|
|
|
|
# is executed
|
|
|
|
# After <enter> is pressed; before the commandline is executed
|
|
|
|
$env.config.hooks.env_change = [] # When a specified environment variable changes
|
|
|
|
$env.config.hooks.pre_execution = []
|
|
|
|
$env.config.hooks.display_output = "" # Before Nushell output is displayed in the terminal
|
|
|
|
# When a specified environment variable changes
|
|
|
|
$env.config.hooks.command_not_found = [] # When a command is not found
|
|
|
|
$env.config.hooks.env_change = {
|
|
|
|
|
|
|
|
# run if the PWD environment is different since the last repl input
|
|
|
|
|
|
|
|
PWD: [{|before, after| null }]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# Before Nushell output is displayed in the terminal
|
|
|
|
|
|
|
|
$env.config.hooks.display_output = "if (term size).columns >= 100 { table -e } else { table }"
|
|
|
|
|
|
|
|
# When a command is not found
|
|
|
|
|
|
|
|
$env.config.hooks.command_not_found = []
|
|
|
|
|
|
|
|
|
|
|
|
# -----------
|
|
|
|
# -----------
|
|
|
|
# Keybindings
|
|
|
|
# Keybindings
|
|
|
@ -480,27 +490,22 @@ $env.config.menus ++= [
|
|
|
|
# Plugin behavior
|
|
|
|
# Plugin behavior
|
|
|
|
# ---------------
|
|
|
|
# ---------------
|
|
|
|
# Per-plugin configuration. See https://www.nushell.sh/contributor-book/plugins.html#configuration.
|
|
|
|
# Per-plugin configuration. See https://www.nushell.sh/contributor-book/plugins.html#configuration.
|
|
|
|
plugins: {}
|
|
|
|
|
|
|
|
$env.config.plugins
|
|
|
|
$env.config.plugins
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Configuration for plugin garbage collection
|
|
|
|
$env.config.plugin_gc
|
|
|
|
$env.config.plugin_gc
|
|
|
|
$env.config.plugin_gc.default
|
|
|
|
$env.config.plugin_gc.default
|
|
|
|
|
|
|
|
# true to enable stopping of inactive plugins
|
|
|
|
$env.config.plugin_gc.default.enabled
|
|
|
|
$env.config.plugin_gc.default.enabled
|
|
|
|
|
|
|
|
# How long to wait after a plugin is inactive before stopping it
|
|
|
|
$env.config.plugin_gc.default.stop_after
|
|
|
|
$env.config.plugin_gc.default.stop_after
|
|
|
|
$env.config.plugin_gc.plugins
|
|
|
|
$env.config.plugin_gc.plugins = {
|
|
|
|
plugin_gc: {
|
|
|
|
# Alternate configuration for specific plugins, by name, for example:
|
|
|
|
# Configuration for plugin garbage collection
|
|
|
|
|
|
|
|
default: {
|
|
|
|
|
|
|
|
enabled: true # true to enable stopping of inactive plugins
|
|
|
|
|
|
|
|
stop_after: 10sec # how long to wait after a plugin is inactive to stop it
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
plugins: {
|
|
|
|
|
|
|
|
# alternate configuration for specific plugins, by name, for example:
|
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# gstat: {
|
|
|
|
# gstat: {
|
|
|
|
# enabled: false
|
|
|
|
# enabled: false
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# -------------------------------------
|
|
|
|
# -------------------------------------
|
|
|
@ -914,10 +919,10 @@ const NU_PLUGIN_DIRS = $NU_PLUGIN_DIRS ++ [($nu.default-config-dir | path join '
|
|
|
|
# Because of the previous ENV_CONVERSIONS (performed internally
|
|
|
|
# Because of the previous ENV_CONVERSIONS (performed internally
|
|
|
|
# before your config.nu loads), the path variable is a list that can
|
|
|
|
# before your config.nu loads), the path variable is a list that can
|
|
|
|
# be appended to using, for example:
|
|
|
|
# be appended to using, for example:
|
|
|
|
$env.path ++= "~/.local/bin"
|
|
|
|
$env.PATH ++= [ "~/.local/bin" ]
|
|
|
|
|
|
|
|
|
|
|
|
# Or prepend using
|
|
|
|
# Or prepend using
|
|
|
|
$env.path = "~/.local/bin" ++ $env.path
|
|
|
|
$env.PATH = [ "~/.local/bin" ] ++ $env.PATH
|
|
|
|
|
|
|
|
|
|
|
|
# The `path add` function from the Standard Library also provides
|
|
|
|
# The `path add` function from the Standard Library also provides
|
|
|
|
# a convenience method for prepending to the path:
|
|
|
|
# a convenience method for prepending to the path:
|
|
|
|