* add nu-pretty-hex, add into binary, update binaryview
* updated parameter name, updated examples
* fixed nu-pretty-hex test
* fixed tests again! and added a no color option to pretty-hex
* Fix array index out of bounds error.
Error occured when computing levenshtein_distance of two strings where
str.len() is not equal to str.chars().collect::<Vec<_>>().len()
* Add test for levenshtein_distance
It compiles and works without errors, but the pager is not asynchronous
anymore (i.e., you need to wait for `seq 1 1000000` to finish before the
pager is displayed).
* Add new path parse subcommand
This includes a slight refactor to all the path subcommand `action()`
functions.
* Remove filestem and extension; Fix example
* Add additional description to path parse
* Put join arg behind flag; Fix missing import (Win)
* Fix error when column path is passed as arg
* Add structured path joining
Structured path is implicitly joined at every patch subcommand call.
* Fix existing path join tests; Fix rustfmt
* Remove redundant 'static lifetime (clippy)
* Add initial impl of path split subcommand
* Add ability to join path from parts
* Fix wrong results in path split examples
* Fix remaining asyncs after engine change
* Do not wrap split path parts into table
When the input is just a list of values, the `path split` command will
split each value directly into the output stream, similar to
`split-row`. Column path--specified values are still wrapped into a
table so they can still be used to replace table fields.
* Join list of values instead of going one-by-one
When `path join` encounters a list of values, it attempts to join them,
instead of going one-by-one like the rest of the path commands. You can
still `each { echo $it | path join }` to join them one-by-one, if the
values are, e.g., tables.
Now, the behavior of `path split` and `path join` should match the
`split-row` and `str collect` counterparts and should hopefully align
better with user's expectations.
* Make sure path join detects structured path
* Fix panic on empty input stream
Also, doesn't collect input into vector unnecessarily.
* Fix path join not appending value
* Remove argument serialization
* Make better errors; Misc refactor
* OsStr -> String encoding is now lossy, instead of throwing an error
* The consequence is action() now always returns Value instead of Result
* Removed redundant handle_value() call in `path join`
* Fix possible incorrect error detection in `path split`
* Applied rustfmt + clippy
* Add more usage, examples & test; Fix type error
The 'parent' column was required to be a path but didn't work with
string.
* Add more help & examples; Maybe fix Windows error
* Refactor operate function
Reducing code repetition
* Review usages and examples
* Add the option to manually specify the extension
* Add more tests; Fix failures on Windows
* Move path commands to engine-p
* Small refactor
* add query json plugin for experimentation
* add some error handling
* closer but Kind::Array is still horked
* unravel the table so the output looks right
* clippy
* added the ability to use gjson modifiers
* Add iter-extensions
* Move all to enginep style
* Remove iter extensions
* Fix clippy lints
* Add comment and make ? more visible
* Remove try_all
* Remove all because it cant return err
With the current code it is possible to attach custom commands from
a custom binary, but only for interactive mode. This change makes
it possible to also customize the evaluation context for commands
and scripts.
* Output error when ls into a file without permission
* math sqrt
* added test to check fails when ls into prohibited dir
* fix lint
* math sqrt with tests and doc
* trigger wasm build
* Update filesystem_shell.rs
* converted math commands to outputstream and new method for arg evaluation
* fmt
* clippy
Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
If built without `trash_support`, nu should explicitly reject attempts to use `rm` with the `--trash` option, or with a config file which includes `rm_always_trash = true`.
As of 42fac72, there doesn't seem to be any guard in the `#[cfg(not(feature = "trash-support"))]` block of `filesystem_shell::rm`, leading to the behavior described in #3116, where builds without the trash-support feature will delete things permanently regardless of flags/config options.
This should close#3116