Skip to content

Commit 72b77d6

Browse files
authored
Add docs for configuration command (#501)
* Add confiugration command * format * rephrase
1 parent 7940929 commit 72b77d6

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

book/configuration.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ These are some important variables to look at for Nushell-specific settings:
5151
- `PROMPT_INDICATOR_VI_NORMAL = "〉 "`
5252
- `PROMPT_MULTILINE_INDICATOR = "::: "`
5353

54+
### Configurations with built-in commands
55+
56+
Starting with release v0.64 of Nushell, we have introduced two new commands(`config nu` and `config env`) which help you quickly edit nu configurations with your preferred text editor/IDE
57+
58+
Nushell follows underneath orders to locate the editor:
59+
60+
1. `$config.buffer_editor`
61+
2. `$env.EDITOR`
62+
3. `$env.VISUAL`
63+
4. If 1~3 not found, then launch `notepad` for windows, otherwise run `nano`
64+
5465
### Color Config section
5566

5667
You can learn more about setting up colors and theming in the [associated chapter](coloring_and_theming.md).

zh-CN/book/configuration.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ _(尽管 `$env.config` 是一个环境变量,按照惯例它仍然在 `config.
5151
- `PROMPT_INDICATOR_VI_NORMAL = "〉 "`
5252
- `PROMPT_MULTILINE_INDICATOR = "::: "`
5353

54+
### 使用内置命令
55+
56+
从 Nushell 0.64 版本开始新增了 2 个内置命令(`config nu``config env`),凭借这两个命令,你可以使用自定义的编辑器或者 IDE 快速地更改 Nushell 配置信息
57+
58+
Nushell 遵循如下的规则来匹配编辑器:
59+
60+
1. `$config.buffer_editor`
61+
2. `$env.EDITOR`
62+
3. `$env.VISUAL`
63+
4. 如果上面都未匹配成功,则针对 Windows 运行`notepad`, 其他系统`nano`
64+
5465
### 颜色配置部分
5566

5667
你可以在 [相关章节](coloring_and_theming.md) 中了解更多关于设置颜色和主题的信息。

0 commit comments

Comments
 (0)