Skip to content

Commit 329bf65

Browse files
committed
Converted remaining blockquotes to callouts
1 parent 3b179ab commit 329bf65

File tree

3 files changed

+38
-39
lines changed

3 files changed

+38
-39
lines changed

book/custom_completions.md

Lines changed: 23 additions & 22 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

@@ -174,12 +174,13 @@ For this, set the `external_completer` field in `config.nu` to a [closure](types
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/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)