* fix#4161
println! and friends will panic on BrokenPipe. The solution is to use
writeln! instead, and ignore the error (or do we want to do something else?)
* test that nu doesn't panic in case of BrokenPipe error
* fixup! test that nu doesn't panic in case of BrokenPipe error
* make do_not_panic_if_broken_pipe only run on UNIX systems
* feat(into): add example of into-bool
* feat(into): add convert from int and float
* feat(into): add converting string to bool
* feat(into): add converting value in table
* fix(into): update error
* fix(into): update span for example
* chore(into): update signature description
* float comparison using epsilon
* Update bool.rs
Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
* A first working version of flatten. Needs a lot of cleanup. Committing to have a working version
* Typo fix
* Flatten tests pass
* Final cleanup, ready for push
* Final cleanup, ready for push
* Final cleanup, ready for push
* Final cleanup, ready for push
* Update flatten.rs
Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
* Proof of concept treating env vars as Values
* Refactor env var collection and method name
* Remove unnecessary pub
* Move env translations into a new file
* Fix LS_COLORS to support any Value
* Fix spans during env var translation
* Add span to env var in cd
* Improve error diagnostics
* Fix non-string env vars failing string conversion
* Make PROMPT_COMMAND a Block instead of String
* Record host env vars to a fake file
This will give spans to env vars that would otherwise be without one.
Makes errors less confusing.
* Add 'env' command to list env vars
It will list also their values translated to strings
* Sort env command by name; Add env var type
* Remove obsolete test
* Porting 'ansi' command from nushell to engine-q
* Added StrCollect to example_test.rs to allow example tests to run
* Run 'cargo fmt' to fix formatting
* Update command.rs
* Update command.rs
* Update command.rs
* Added a category
Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
I removed the Inflector dependency in favor of heck for two reasons:
- to close#3674.
- heck seems simpler and actively maintained
We could probably alter the structure of the `str_` module to expose the
individual casing behaviors better.
I did not feel as confident on changing those signatures.
So I took a lazier approach of a macro in the `mod.rs` that creates the public
shimming function to heck's traits.