Skip to content

Commit 8eb76f9

Browse files
authored
Document wrap behavior with index
1 parent afc86c2 commit 8eb76f9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

commands/docs/wrap.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,20 @@ Wrap a range into a table with a given column name
5757
╰───┴─────╯
5858
5959
```
60+
61+
## Notes
62+
Since `index` is a special keyword that defines the index of the table itself, in this case, `wrap` behavior might be surprising to some.
63+
```nu
64+
> [4 5 6] | wrap index
65+
╭───┬───────────────╮
66+
│ 4 │ ╭───────┬───╮ │
67+
│ │ │ index │ 4 │ │
68+
│ │ ╰───────┴───╯ │
69+
│ 5 │ ╭───────┬───╮ │
70+
│ │ │ index │ 5 │ │
71+
│ │ ╰───────┴───╯ │
72+
│ 6 │ ╭───────┬───╮ │
73+
│ │ │ index │ 6 │ │
74+
│ │ ╰───────┴───╯ │
75+
╰───┴───────────────╯
76+
```

0 commit comments

Comments
 (0)