1
0
mirror of https://github.com/nushell/nushell.git synced 2025-04-12 23:38:20 +02:00
nushell/crates/nu-command/src/filesystem
NotTheDr01ds 36ad7f15c4
cd/def --env examples ()
# Description

Per a Discord question
(https://discord.com/channels/601130461678272522/1244293194603167845/1247794228696711198),
this adds examples to the `help` for both:

* `cd`
* `def`

to demonstrate that `def --env` is required when changing directories in
a custom command.

Since the existing examples for `def` were a bit more complex (and had
output) but the `cd` ones were more simplified, I did use slightly
different examples in each. Either or both could be tweaked if desired.

# User-Facing Changes

Command `help` examples

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

N/A

---------

Co-authored-by: Jakub Žádník <kubouch@gmail.com>
2024-06-05 21:35:31 +03:00
..
cd.rs cd/def --env examples () 2024-06-05 21:35:31 +03:00
du.rs ListStream touchup () 2024-05-05 16:00:59 +00:00
glob.rs Migrate to a new PWD API (part 2) () 2024-05-07 18:17:49 +03:00
ls.rs Allow ls works inside dir with [] brackets () 2024-05-06 14:01:32 +08:00
mktemp.rs Migrate to a new PWD API () 2024-05-03 14:33:09 +03:00
mod.rs remove old mv command in favor of umv (renamed to mv) () 2024-03-01 09:37:23 +08:00
open.rs Use CommandType in more places () 2024-05-18 23:37:31 +00:00
rm.rs Refactor message printing in rm () 2024-05-09 13:36:47 +08:00
save.rs Take owned Read and Write () 2024-05-20 15:10:36 +02:00
start.rs Add command_prelude module () 2024-03-26 21:17:30 +00:00
touch.rs Fix touch --reference using PWD from the environment () 2024-05-26 20:24:00 +03:00
ucp.rs Migrate to a new PWD API () 2024-05-03 14:33:09 +03:00
umkdir.rs Migrate to a new PWD API () 2024-05-03 14:33:09 +03:00
umv.rs Migrate to a new PWD API () 2024-05-03 14:33:09 +03:00
util.rs making ls and du supports rest parameters. () 2024-04-13 15:03:17 +00:00
watch.rs Migrate to a new PWD API (part 2) () 2024-05-07 18:17:49 +03:00