* add -p for path expand, so it doesn't follow symlink
* fix arg name
* rename from no-dereferenct to no-follow-link
* rename from no-follow-link to no-symlink, and change short -p to -n
* follow strict first
* fix
* simplify test
* fix clippy
* fix test on windows
The test was reading the operating system error message which is
dependent on the system locale.
Just test for the `(os error 2)` errorcode instead.
This should support both
unixoid systems and Windows in more locales.
* Fix ls panics when a file or directory not exists
Fixes#6146
Signed-off-by: nibon7 <nibon7@163.com>
* add test
Signed-off-by: nibon7 <nibon7@163.com>
* expand durations to include month, year, decade
* remove commented out fn
* oops, found more debug comments
* tweaked tests for the new way, borrowed heavily from chrono-humanize-rs
* clippy
* grammar
* introduce external command runs to failed error, and implement semicolon relative logic
* ignore test due to semicolon works
* not raise ShellError for external commands
* update comment
* add relative test in for windows
* fix type-o
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
* Fix 5978
* Add unit test for explicit glob
* Format
* Expansion vs none-expansion
* Add unit tests
* Fix format..
* Add debug message for MacOS
* Fix UT on Mac and add tests for windows
* cleanup
* clean up windows test
* single and double qoutes tests
* format...
* Save format.
* Add log to failed windows unit tests
* try `touch` a file
* PS or CMD
* roll back some change
* format
* Remove log and test case
* Add unit test comments
* Fix
Co-authored-by: Frank <v-frankz@microsoft.com>
* Remove comment
* Split delta and environment merging
* Move table mode to a more logical place
* Cleanup
* Merge environment after reading default_env.nu
* Fmt
* Avoid extending the directory without globs in `nu_engine::glob_from`
* avoid joining a `*` to the directory without globs
* remove checks on directory permission and whether it is empty
The previous implemention of `nu_engine::glob_from` will extend the
given directory even if it containes no glob pattern. This commit
overcomes lack of consistency with the function `nu_glob::glob`.
* Add flag -D to ls, to list the directory itself instead of its contents
* add --directory (-d) flag to ls
* correct the difference between the given path and the cwd
* set default path to `.` instead of `./*` when --directory (-d) flag is true
* add comments
* add an example
* add tests
* fmt
* Add all flag
* Make all and moduel flags as mutually exclusive
* Fix new test
* format code...
* tweak words
* another tweak
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
* adds `capture-errors` flag for `do`
* adds `get-type` core command to get type
* fmt
* add tests in example
* fmt
* fix tests
* manually revert previous changes related to `get-type`
* adds method to check for error name using `into string`
* fix clippy
* feat: deprecate `hash base64` command
* feat: extend `decode` and `encode` command families
This commit
- Adds `encode` command family
- Backports `hash base64` features to `encode base64` and `decode base64` subcommands.
- Refactors code a bit and extends tests for encodings
- `decode base64` returns a binary `Value` (that may be decoded into a string using `decode` command)
* feat: add `--binary(-b)` flag to `decode base64`
Default output type is now string, but binary can be requested using this new flag.