nushell/crates/nu-std/std
Douglas ad31f1cf26
Fix dirs removal warning (#14029)
# Description

* Primary purpose is to fix an issue with a missing escaped opening
parenthesis in the warning message when running an old `dirs` alias.
This was creating an error condition from improper interpolation.

Also

* Incorporates #13842 feedback from @kubouch by renaming `std/lib` to
`std/util`
* Removes duplication of code in `export-env`
* Renames submodule exports to `std/<submodule>` rather than
`./<submodule>` - No user-facing change other than `view files` appears
"prettier".
* In #13842, I converted the test cases to use `use std/<module>`
syntax. Previously, the tests were (effectively) using `use std *` (due
to pre-existing bugs, now fixed).

So "before", we only had test coverage on `use std *`, and "after" we
only had test coverage on `use std/<module>`. I've started adding test
cases so that we have coverage on *both* scenarios going forward.

For now, `formats` and `util` have been updated with tests for both
scenarios. I'll continue adding the others in future PRs.

# User-Facing Changes

No user-facing changes - Bug fix, refactor, and test cases only

# Tests + Formatting

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

# After Submitting

Still working on updating the Doc. I ran into the `dirs` issue while
writing it and rabbit-trailed to fix it in this PR.
2024-10-09 08:03:33 -05:00
..
assert.nu complete the type of --error-label in std assert commands (#12998) 2024-06-05 08:02:17 +08:00
bench.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
core.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
deprecated_dirs.nu Fix dirs removal warning (#14029) 2024-10-09 08:03:33 -05:00
dirs.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
dt.nu Refactor error make (#10923) 2023-11-03 10:09:33 -05:00
formats.nu Fixes #12482 by pointing help links for ndjson to a non-spam source (take 2) (#12509) 2024-04-13 18:59:43 -05:00
help.nu Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
input.nu Command to get individual keys (#9453) 2023-07-03 10:23:44 -05:00
iter.nu Change behavior of into record on lists to be more useful (#13637) 2024-08-22 11:38:43 +02:00
log.nu Respect user-defined $env.NU_LOG_FORMAT and $env.NU_LOG_DATE_FORMAT (#13692) 2024-08-28 07:57:43 -05:00
math.nu move math constants to standard library (#9678) 2023-09-05 19:32:31 +02:00
mod.nu Fix dirs removal warning (#14029) 2024-10-09 08:03:33 -05:00
util.nu Fix dirs removal warning (#14029) 2024-10-09 08:03:33 -05:00
xml.nu Refactor error make (#10923) 2023-11-03 10:09:33 -05:00