Skip to content

Commit e5d2688

Browse files
authored
Convert blockquotes to callouts (#1569)
* Converted remaining blockquotes to callouts * A few more blockquotes found
1 parent 68620e2 commit e5d2688

File tree

5 files changed

+51
-49
lines changed

5 files changed

+51
-49
lines changed

book/aliases.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,16 @@ displaying all listed files and folders in a grid.
6262

6363
## Replacing Existing Commands Using Aliases
6464

65-
> Caution! When replacing commands it is best to "back up" the command first and avoid recursion error.
65+
::: warning Caution!
66+
When replacing commands it is best to "back up" the command first and avoid recursion error.
67+
:::
6668

6769
How to back up a command like `ls`:
70+
6871
```nu
6972
alias core-ls = ls # This will create a new alias core-ls for ls
7073
```
74+
7175
Now you can use `core-ls` as `ls` in your nu-programming. You will see further down how to use `core-ls`.
7276

7377
The reason you need to use alias is because, unlike `def`, aliases are position-dependent. So, you need to "back up" the old command first with an alias, before re-defining it.

book/custom_completions.md

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -138,25 +138,25 @@ def my_commits [] {
138138
}
139139
```
140140

141-
> **Note**
142-
>
143-
> with the following snippet
144-
>
145-
> ```nu
146-
> def my-command [commit: string@my_commits] {
147-
> print $commit
148-
> }
149-
> ```
150-
>
151-
> be aware that, even though the completion menu will show you something like
152-
>
153-
> ```nu
154-
> >_ my-command <TAB>
155-
> 5c2464 Add .gitignore
156-
> f3a377 Initial commit
157-
> ```
158-
>
159-
> only the value, i.e. "5c2464" or "f3a377", will be used in the command arguments!
141+
::: tip Note
142+
With the following snippet:
143+
144+
```nu
145+
def my-command [commit: string@my_commits] {
146+
print $commit
147+
}
148+
```
149+
150+
... be aware that, even though the completion menu will show you something like
151+
152+
```nu
153+
>_ my-command <TAB>
154+
5c2464 Add .gitignore
155+
f3a377 Initial commit
156+
```
157+
158+
... only the value (i.e., "5c2464" or "f3a377") will be used in the command arguments!
159+
:::
160160

161161
## External Completions
162162

@@ -165,21 +165,22 @@ External completers can also be integrated, instead of relying solely on Nushell
165165
For this, set the `external_completer` field in `config.nu` to a [closure](types_of_data.md#closures) which will be evaluated if no Nushell completions were found.
166166

167167
```nu
168-
> $env.config.completions.external = {
169-
> enable: true
170-
> max_results: 100
171-
> completer: $completer
172-
> }
168+
$env.config.completions.external = {
169+
enable: true
170+
max_results: 100
171+
completer: $completer
172+
}
173173
```
174174

175175
You can configure the closure to run an external completer, such as [carapace](https://github.com/rsteube/carapace-bin).
176176

177-
When the closure returns unparsable json (e.g. an empty string) it defaults to file completion.
177+
When the closure returns unparsable json (e.g., an empty string) it defaults to file completion.
178178

179179
An external completer is a function that takes the current command as a string list, and outputs a list of records with `value` and `description` keys, like custom completion functions.
180180

181-
> **Note**
182-
> This closure will accept the current command as a list. For example, typing `my-command --arg1 <tab>` will receive `[my-command --arg1 " "]`.
181+
::: tip Note
182+
This closure will accept the current command as a list. For example, typing `my-command --arg1 <tab>` will receive `[my-command --arg1 " "]`.
183+
:::
183184

184185
This example will enable carapace external completions:
185186

book/dataframes.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ Pandas](https://pandas.pydata.org/) commands. For the time being don't pay too
3737
much attention to the [`Dataframe` commands](/commands/categories/dataframe.md). They will be explained in later
3838
sections of this page.
3939

40-
> System Details: The benchmarks presented in this section were run using a
41-
> Macbook with a processor M1 pro and 32gb of ram
42-
>
43-
> All examples were run on Nushell version 0.97 using `nu_plugin_polars 0.97`
40+
::: tip System Details
41+
The benchmarks presented in this section were run using a Macbook with a processor M1 pro and 32gb of ram. All examples were run on Nushell version 0.97 using `nu_plugin_polars 0.97`.
42+
:::
4443

4544
### File Information
4645

book/pipelines.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -371,16 +371,16 @@ And the pipeline:
371371

372372
Are one and the same.
373373

374-
> **Note**
375-
> the sentence _are one and the same_ above only applies for the graphical output in the shell,
376-
> it does not mean the two data structures are them same
377-
>
378-
> ```nushell
379-
> > (ls) == (ls | table)
380-
> false
381-
> ```
382-
>
383-
> `ls | table` is not even structured data!
374+
::: tip Note
375+
The phrase _"are one and the same"_ above only applies to the graphical output in the shell, it does not mean the two data structures are the same:
376+
377+
```nushell
378+
(ls) == (ls | table)
379+
# => false
380+
```
381+
382+
`ls | table` is not even structured data!
383+
:::
384384

385385
## Output Result to External Commands
386386

book/variables.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@ There are a couple of assignment operators used with mutable variables
5959
| `/=` | Divides the variable by a value and makes the quotient its new value |
6060
| `++=` | Appends a list or a value to a variable |
6161

62-
> **Note**
63-
>
64-
> 1. `+=`, `-=`, `*=` and `/=` are only valid in the contexts where their root operations
65-
> are expected to work. For example, `+=` uses addition, so it can not be used for contexts
66-
> where addition would normally fail
67-
> 2. `++=` requires that either the variable **or** the argument is a
68-
> list.
62+
::: tip Note
63+
64+
1. `+=`, `-=`, `*=` and `/=` are only valid in the contexts where their root operations are expected to work. For example, `+=` uses addition, so it can not be used for contexts where addition would normally fail
65+
2. `++=` requires that either the variable **or** the argument is a list.
66+
:::
6967

7068
#### More on Mutability
7169

0 commit comments

Comments
 (0)