Skip to content

Commit 28df3d5

Browse files
committed
doc: wrap variable-like things in ``
1 parent abd985a commit 28df3d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/sorting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ let weight = {alpha: 10, beta: 5, gamma: 3}
205205

206206
In addition to [key closures](#sort-by-key-closure), `sort-by` also supports closures which specify a custom sort order. The `--custom`, or `-c`, flag will tell `sort-by` to interpret closures as custom sort closures. A custom sort closure has two parameters, and returns a boolean. The closure should return `true` if the first parameter comes _before_ the second parameter in the sort order.
207207

208-
For a simple example, we could rewrite a cell path sort as a custom sort. This can be read as "If $a.size is less than $b.size, a should appear before b in the sort order":
208+
For a simple example, we could rewrite a cell path sort as a custom sort. This can be read as "If `$a.size` is less than `$b.size`, `a` should appear before `b` in the sort order":
209209

210210
```nu
211211
ls | sort-by -c {|a, b| $a.size < $b.size }

0 commit comments

Comments
 (0)