Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions book/3rdpartyprompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Nerd Fonts are not required, but they can improve the prompt presentation throug
> Nerd Fonts patches developer targeted fonts with a high number of glyphs (icons).
> Specifically to add a high number of extra glyphs from popular ‘iconic fonts’ such as Font Awesome, Devicons, Octicons, and others.

* [Nerd Fonts website](https://www.nerdfonts.com)
* [Source Repository](https://github.com/ryanoasis/nerd-fonts)
- [Nerd Fonts website](https://www.nerdfonts.com)
- [Source Repository](https://github.com/ryanoasis/nerd-fonts)

## oh-my-posh

Expand Down Expand Up @@ -66,7 +66,8 @@ Starship running without doing anything manual:

- Starship will create its own configuration / environment setup script
- you simply have to create it in `env.nu` and `use` it in `config.nu`
:::

:::

Here's an example config section for Starship:

Expand Down
10 changes: 7 additions & 3 deletions book/how_nushell_code_gets_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ next:
text: (Not so) Advanced
link: /book/advanced.md
---

# How Nushell Code Gets Run

In [Thinking in Nu](./thinking_in_nu.md#think-of-nushell-as-a-compiled-language), we encouraged you to _"Think of Nushell as a compiled language"_ due to the way in which Nushell code is processed. We also covered several code examples that won't work in Nushell due that process.
Expand Down Expand Up @@ -281,7 +282,8 @@ In the text below, we use the term _"constant"_ to refer to:

- A `const` definition
- The result of any command that outputs a constant value when provide constant inputs.
:::

:::

By their nature, **_constants_** and constant values are known at Parse-time. This, of course, is in sharp contrast to _variable_ declarations and values.

Expand Down Expand Up @@ -317,7 +319,8 @@ Let's analyze the Parse/Eval process for this version:

- An `eval` adds additional parsing during evaluation
- Parse-time constants do the opposite, adding additional evaluation to the parser.
:::

:::

Also keep in mind that the evaluation allowed during parsing is **_very restricted_**. It is limited to only a small subset of what is allowed during a regular evaluation.

Expand Down Expand Up @@ -364,7 +367,8 @@ There are two reasons for this:
This isn't currently applicable to Nushell, since the parsed results (IR) are not stored beyond Evaluation. However, this has certainly been considered as a possible future feature.

2. As with Nushell's parse-time constant evaluations, these features help (safely) work around limitations caused by the absence of an `eval` function.
:::

:::

## Conclusion

Expand Down
3 changes: 2 additions & 1 deletion book/sorting.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ The parameters are also passed to the custom closure as a two element list, so t

- `{|a, b| $a < $b }`
- `{ $in.0 < $in.1 }`
:::

:::

Here's an example of a custom sort which couldn't be trivially written as a key sort. In this example, we have a queue of tasks with some amount of work time and a priority. We want to sort by priority (highest first). If a task has had zero work time, we want to schedule it immediately; otherwise, we ignore the work time.

Expand Down