* Add error message for csv parsing failures
* Add csv error prettyfier
* Improve readability of the error
Line 2: error is easier to understand than:
Line 2, error
* Remove unnecessary use of the format! macro
Replacing it with .to_string() fixes a clippy warning
* Improve consistency with JSON parsing errors
* Custom canonicalize method for FilesystemShell.
* Use custom canonicalize method.
Fixed missing import.
* Move function body to already impl body.
* Create test that aims to resolve.
* Utility function to detect hidden folders.
Implemented for Unix and Windows.
* Rename function argument.
* Revert "Rename function argument."
This reverts commit e7ab70f0f0.
* Add flag '--all/-a' to Ls
* Rename function argument.
* Check if flag '--all/-a' is present and path is hidden.
Replace match with map_err for glob result.
Remove redundancy in stream body.
Included comments on new stream body.
Replace async_stream::stream with async_stream::try_stream.
Minor tweaks to is_empty_dir.
Fix and refactor is_hidden_dir.
* Fix "implicit" bool coerse
* Fixed clippy errors
For some commands like `which` -h flag would trigger an error asking for
missing required parameters instead of printing the help message as it
does with --help. This commit adds a check in the command parser to
avoid that.
* Fix deleting named pipes
* Use std::os::unix::fs::FileTypeExt to show correct type for unix-specific fs objects; Fix formatting
Co-authored-by: Linards Kalvāns <linards.kalvans@twino.eu>
The extra newline character makes it hard to use nu as part of an
external processing pipeline, since the extra character could taint the
results. For example:
```
$ nu -c 'echo test | xxd'
00000000: 7465 7374 test
```
versus
```
nu -c 'echo test' | xxd
00000000: 7465 7374 0a test.
```
* WIP: move to bytes codec
* Progress on adding collect helpers
* Progress on adding collect helpers
* Add in line splitting back to lines
* Lines outputting line primitives
* Close to ready?
* Finish fixing lines
* clippy fixes
* fmt fixes
* removed unused code
* Cleanup a few bits
* Cleanup a few bits
* Cleanup a few more bits
* Fix failing test with corrected test case
* Fix and refactor cd for Filesystem Shell.
Reorder check conditions, don't check existence twice.
If building for unix check exec bit on folder.
* Import PermissionsExt only on unix target.
* It seems that this is the correct way?
This improves incremental build time when working on what was previously
the root package. For example, previously all plugins would be rebuilt
with a change to `src/commands/classified/external.rs`, but now only
`nu-cli` will have to be rebuilt (and anything that depends on it).
In particular, one thing that we can't (properly) do before this commit
is consuming an infinite input stream. For example:
```
yes | grep y | head -n10
```
will give 10 "y"s in most shells, but blocks indefinitely in nu. This PR
resolves that by doing blocking I/O in threads, and reducing the `await`
calls we currently have in our pipeline code.
* Add very basic documentation. Need to play with rest of the api to figure out what it does
* Add some documentation to more of the Plugin API methods
* fmt
* typo fixes
* Change signature to take in short-hand flags
* update help information
* Parse short-hand flags as their long counterparts
* lints
* Modified a couple tests to use shorthand flags
* Add some docs for meta.rs
* add better explanation for Span merging
* Add some doc tests - not sure how to get them to run
* get rid of doc comments for the temporary method
* add doc test for is_unknown
* fmt
* Refactor pipeline ahead of block changes. Add '-c' commandline option
* Update pipelining an error value
* Fmt
* Clippy
* Add stdin redirect for -c flag
* Add stdin redirect for -c flag