mirror of
https://github.com/nushell/nushell
synced 2025-01-12 13:19:01 +00:00
[docs/enter] Warn about enter
opening multiple shells (#1645)
Opening a JSON with a top-level list, opens one shell per list element. This can be extremely confusing to unexpected users.
This commit is contained in:
parent
d7bd77829f
commit
6887554888
1 changed files with 20 additions and 0 deletions
|
@ -37,3 +37,23 @@ It also provides the ability to work with multiple directories at the same time.
|
||||||
/> n
|
/> n
|
||||||
/tmp>
|
/tmp>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Note
|
||||||
|
|
||||||
|
If you `enter` a JSON file with multiple a top-level list, this will open one new shell for each list element.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
/private/tmp> printf "1\\n2\\n3\\n" | lines | save foo.json
|
||||||
|
/private/tmp> enter foo.json
|
||||||
|
/> shells
|
||||||
|
───┬────────┬─────────────────────────┬──────────────
|
||||||
|
# │ active │ name │ path
|
||||||
|
───┼────────┼─────────────────────────┼──────────────
|
||||||
|
0 │ │ filesystem │ /private/tmp
|
||||||
|
1 │ │ {/private/tmp/foo.json} │ /
|
||||||
|
2 │ │ {/private/tmp/foo.json} │ /
|
||||||
|
3 │ X │ {/private/tmp/foo.json} │ /
|
||||||
|
───┴────────┴─────────────────────────┴──────────────
|
||||||
|
/>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue