mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
Add documentation for the enter command
This commit is contained in:
parent
b066775630
commit
c09d866a77
1 changed files with 39 additions and 0 deletions
39
docs/commands/enter.md
Normal file
39
docs/commands/enter.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# enter
|
||||
|
||||
This command creates a new shell and begin at this path.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
/home/foobar> cat user.json
|
||||
{
|
||||
"Name": "Peter",
|
||||
"Age": 30,
|
||||
"Telephone": 88204828,
|
||||
"Country": "Singapore"
|
||||
}
|
||||
/home/foobar> enter user.json
|
||||
/> ls
|
||||
━━━━━━━┯━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━
|
||||
Name │ Age │ Telephone │ Country
|
||||
───────┼─────┼───────────┼───────────
|
||||
Peter │ 30 │ 88204828 │ Singapore
|
||||
━━━━━━━┷━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━
|
||||
/> exit
|
||||
/home/foobar>
|
||||
```
|
||||
|
||||
It also provides the ability to work with multiple directories at the same time. This command will allow you to create a new "shell" and enter it at the specified path. You can toggle between this new shell and the original shell with the `p` (for previous) and `n` (for next), allowing you to navigate around a ring buffer of shells. Once you're done with a shell, you can `exit` it and remove it from the ring buffer.
|
||||
|
||||
```shell
|
||||
/> enter /tmp
|
||||
/tmp> enter /usr
|
||||
/usr> enter /bin
|
||||
/bin> enter /opt
|
||||
/opt> p
|
||||
/bin> p
|
||||
/usr> p
|
||||
/tmp> p
|
||||
/> n
|
||||
/tmp>
|
||||
```
|
Loading…
Reference in a new issue