From b5f12a499dfa38d0baf2daf50f745ad079e9eb73 Mon Sep 17 00:00:00 2001 From: callum Date: Sat, 21 Dec 2024 22:53:57 +0000 Subject: [PATCH 1/4] fix errors in en book --- book/configuration.md | 2 +- book/nu_as_a_shell.md | 6 +++--- book/pipelines.md | 2 +- book/working_with_strings.md | 4 +++- lang-guide/chapters/types/basic_types/range.md | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/book/configuration.md b/book/configuration.md index 4b6b48e67e7..1f5691352cd 100644 --- a/book/configuration.md +++ b/book/configuration.md @@ -5,7 +5,7 @@ Nushell uses a configuration system that loads and runs two Nushell script files at launch time: - `env.nu` is used to define environment variables or write files before `config.nu` starts. For example [`$env.NU_LIB_DIRS`](/book/modules.md#dumping-files-into-directory) controls where Nu finds imports. Third party scripts, like prompts or [mise](https://mise.jdx.dev/getting-started.html#nushell), must already be saved to disk before `config.nu` can read them. -- `config.nu` is used to add definitions, aliases, and more to the global namespace. It can also use the environment variables and constants defined in `env.nu`. If you can't decide which file to add stuff, prefer `config.nu`. +- `config.nu` is used to add definitions, aliases, and more to the global namespace. It can also use the environment variables and constants defined in `env.nu`. If you can't decide which file to add stuff to, prefer `config.nu`. Check where Nushell is reading these config files from by calling `$nu.env-path` and `$nu.config-path`. diff --git a/book/nu_as_a_shell.md b/book/nu_as_a_shell.md index ebb5aea8241..7f457ac9072 100644 --- a/book/nu_as_a_shell.md +++ b/book/nu_as_a_shell.md @@ -19,10 +19,10 @@ An interesting feature of Nushell is the [Directory Stack](directory_stack.md) w Nushell also has its own line editor [Reedline](line_editor.md). With Nushell's config, it is possible to configure some of the Reedline's features, such as the prompt, keybindings, history, or menus. -It is also possible to define [custom signatures for external commands](externs.md) which lets you define [custom completions](custom_completions.md) for them (the custom completions work also for Nushell custom commands). +It is also possible to define [custom signatures for external commands](externs.md) which lets you define [custom completions](custom_completions.md) for them (the custom completions also work for Nushell custom commands). [Coloring and Theming in Nu](coloring_and_theming.md) goes into more detail about how to configure Nushell's appearance. -If you want to schedule some commands to run in the background, [Background task in Nu](background_task.md) provide a simple guideline for you to follow. +If you want to schedule some commands to run in the background, [Background task in Nu](background_task.md) provides simple guidelines for you to follow. -And finally, [hooks](hooks.md) allow you to insert fragments of Nushell code to run at certain events. +Finally, [hooks](hooks.md) allow you to insert fragments of Nushell code to run at certain events. diff --git a/book/pipelines.md b/book/pipelines.md index 5544b49579d..508be94c366 100644 --- a/book/pipelines.md +++ b/book/pipelines.md @@ -453,7 +453,7 @@ drwxr-xr-x@ 4 pengs admin 128 14 Nov 13:42 en (Actually, for this simple usage you can just use [`find`](/commands/docs/find.md)) ```nu -> ls /usr/share/nvim/runtime/ | get name | find tutor | ^ls -al $in +> ls /usr/share/nvim/runtime/ | get name | find tutor | ansi strip | ^ls -al ...$in ``` ## Command Output in Nushell diff --git a/book/working_with_strings.md b/book/working_with_strings.md index 59639f7ac6a..f9d871c526e 100644 --- a/book/working_with_strings.md +++ b/book/working_with_strings.md @@ -437,4 +437,6 @@ You can color strings with the [`ansi`](/commands/docs/ansi.md) command. For exa ``` `ansi purple_bold` makes the text a bold purple -`ansi reset` resets the coloring to the default. (Tip: You should always end colored strings with `ansi reset`) +`ansi reset` resets the coloring to the default. + +_Tip: You should always end colored strings with `ansi reset`_ diff --git a/lang-guide/chapters/types/basic_types/range.md b/lang-guide/chapters/types/basic_types/range.md index 8c3c79d57ef..e141a4f8a86 100644 --- a/lang-guide/chapters/types/basic_types/range.md +++ b/lang-guide/chapters/types/basic_types/range.md @@ -115,7 +115,7 @@ ╰───┴───╯ ``` -1. Conversion - A ranges may be converted to a `list` using: +1. Conversion - A range may be converted to a `list` using: ```nu 1..5 | each {||} From 87bceb4366dd27776a161b4da7cc08ea5bb19804 Mon Sep 17 00:00:00 2001 From: callum Date: Sun, 22 Dec 2024 14:34:53 +0000 Subject: [PATCH 2/4] revert configuration changes to prevent merge conflict --- book/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/configuration.md b/book/configuration.md index 1f5691352cd..4b6b48e67e7 100644 --- a/book/configuration.md +++ b/book/configuration.md @@ -5,7 +5,7 @@ Nushell uses a configuration system that loads and runs two Nushell script files at launch time: - `env.nu` is used to define environment variables or write files before `config.nu` starts. For example [`$env.NU_LIB_DIRS`](/book/modules.md#dumping-files-into-directory) controls where Nu finds imports. Third party scripts, like prompts or [mise](https://mise.jdx.dev/getting-started.html#nushell), must already be saved to disk before `config.nu` can read them. -- `config.nu` is used to add definitions, aliases, and more to the global namespace. It can also use the environment variables and constants defined in `env.nu`. If you can't decide which file to add stuff to, prefer `config.nu`. +- `config.nu` is used to add definitions, aliases, and more to the global namespace. It can also use the environment variables and constants defined in `env.nu`. If you can't decide which file to add stuff, prefer `config.nu`. Check where Nushell is reading these config files from by calling `$nu.env-path` and `$nu.config-path`. From 9fa12bd0ca46b962cdb1199b0c3a02127878faaf Mon Sep 17 00:00:00 2001 From: callum Date: Sun, 22 Dec 2024 14:35:52 +0000 Subject: [PATCH 3/4] fix VuePress tip callout --- book/working_with_strings.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/book/working_with_strings.md b/book/working_with_strings.md index f9d871c526e..0d9d3a3c084 100644 --- a/book/working_with_strings.md +++ b/book/working_with_strings.md @@ -439,4 +439,6 @@ You can color strings with the [`ansi`](/commands/docs/ansi.md) command. For exa `ansi purple_bold` makes the text a bold purple `ansi reset` resets the coloring to the default. -_Tip: You should always end colored strings with `ansi reset`_ +::: tip +You should always end colored strings with `ansi reset` +::: From e1d17415772a5f643940f20e262b5f3283ad337b Mon Sep 17 00:00:00 2001 From: callum Date: Sun, 22 Dec 2024 15:30:43 +0000 Subject: [PATCH 4/4] one more typo --- book/externs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/externs.md b/book/externs.md index 40389c95066..156ca892c24 100644 --- a/book/externs.md +++ b/book/externs.md @@ -35,7 +35,7 @@ Notice that the syntax here is similar to that of the `def` keyword when definin This implementation: -- Will provide `-p` and `-i` (with descriptions) as possibly completions for `ssh -`. +- Will provide `-p` and `-i` (with descriptions) as possible completions for `ssh -`. - Will perform parse-time type checking. Attempting to use a non-`int` for the port number will result in an error (and error-condition syntax highlighting). - Will offer parse-time syntax highlighting based on the shapes of the arguments. - Will offer any private key files in `~/.ssh` as completion values for the `-i` (identity) option