Commit graph

2061 commits

Author SHA1 Message Date
Jonathan Turner
2d078849cb
Add simple to-html output and bump version (#1487) 2020-03-15 16:04:44 +13:00
Kevin DCR
b6363f3ce1
Added new flag '--all/-a' for Ls, also refactor some code (#1483)
* 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
2020-03-14 06:27:04 +13:00
Waldir Pimenta
5ca9e12b7f
Fix whitespace and typos (#1481)
* Remove EOL whitespace in files other than docs

* Break paragraphs into lines

See http://rhodesmill.org/brandon/2012/one-sentence-per-line/ for the rationale

* Fix various typos

* Remove EOL whitespace in docs/commands/*.md
2020-03-14 06:23:41 +13:00
Kyle Criddle
5b0b2f1ddd
Fixes #1204 : sys | get host.users displays the same user (#1480)
account twice while only one exists (macOS)

- renamed host.users to host.sessions
2020-03-12 14:01:55 +13:00
Victor Kukshiev
3afb53b8ce
fix typo in calc command documentation (#1477)
minimumum -> minimum
2020-03-11 11:20:22 -04:00
Andrés N. Robalino
b40d16310c
More relaxed file modes for now. (#1476) 2020-03-11 13:19:15 +13:00
Andrés N. Robalino
d3718d00db
Merge shuffle nu plugin as core command. (#1475) 2020-03-10 17:00:08 -05:00
Jonathan Turner
f716f61fc1
Update Cargo.lock 2020-03-11 08:53:26 +13:00
Jonathan Turner
b2ce669791
Update Cargo.toml 2020-03-11 08:51:53 +13:00
Jonathan Turner
cd155f63e1
Update Cargo.toml 2020-03-11 08:51:17 +13:00
Jonathan Turner
9eaa6877f3
Update Cargo.toml 2020-03-11 08:50:51 +13:00
Jonathan Turner
a6b6afbca9
Update Cargo.toml 2020-03-11 08:08:13 +13:00
Jonathan Turner
62666bebc9
Bump to 0.11.0 (#1474) 2020-03-11 06:34:19 +13:00
rabisg0
d1fcce0cd3
Fixes #1427: Prints help message with -h switch (#1454)
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.
2020-03-11 05:59:50 +13:00
Andrés N. Robalino
a2443fbe02
Remove unused parsing logic. (#1473)
* Remove unused parsing logic.

* Run tokens iteration tests baseline.

* Pass lint.

* lifetimes can be elided without being explicit.
2020-03-10 04:31:42 -05:00
Andrés N. Robalino
db16b56fe1
Columnpath support when passing fields for formatting. (#1472) 2020-03-10 01:55:03 -05:00
Linards Kalvāns
54bf671a50
Fix deleting / showing ls named pipes and other fs objects no… (#1461)
* 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>
2020-03-09 09:02:53 -04:00
Jason Gedge
755d0e648b
Eliminate some compiler warnings (#1468)
- Unnecessary parentheses
- Deprecated `description()` method
2020-03-09 08:19:07 +13:00
Jonathan Turner
e440d8c939
Bump some deps (#1467) 2020-03-09 08:18:44 +13:00
Jason Gedge
01dd358a18
Don't emit a newline in autoview. (#1466)
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.
```
2020-03-09 08:18:24 +13:00
Jonathan Turner
50fb97f6b7
Merge env into $nu and simplify table/get (#1463) 2020-03-08 18:33:30 +13:00
Jean Cavallo
ebf139f5e5
Auto-detect string / binary in save command (#1459)
* Auto-detect string / binary in save command

* Linter
2020-03-08 07:33:29 +13:00
Jonathan Turner
8925ca5da3
Move to bytes/string hybrid codec (#1457)
* 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
2020-03-07 05:06:39 +13:00
Kevin DCR
287652573b
Fix and refactor cd for Filesystem Shell. (#1452)
* 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?
2020-03-06 20:13:47 +13:00
Andrés N. Robalino
db24ad8f36
Add --num parameter to limit the number of output lines (#1455)
Add `--num` parameter to limit the numer of returned elements
2020-03-05 05:26:46 -05:00
Andrés N. Robalino
f88674f353
Nu internals are logged under nu filter. (#1451) 2020-03-05 05:18:53 -05:00
Andrés N. Robalino
59cb0ba381
Color appropiately commands. (#1453) 2020-03-04 23:22:42 -05:00
Andrés N. Robalino
c4cfab5e16
Make feature options available downstream to nu-cli subcrate. (#1450) 2020-03-04 15:31:12 -05:00
Jason Gedge
b2c5af457e
Move most of the root package into a subcrate. (#1445)
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).
2020-03-04 13:58:20 -05:00
Andrés N. Robalino
c731a5b628
Columns can be renamed. (#1447) 2020-03-03 16:01:24 -05:00
Falco Hirschenberger
f97f9d4af3
Update deps locklfile (#1446)
Update deps lockfile
2020-03-03 15:34:22 -05:00
Falco Hirschenberger
ed7d3fed66
Add shuffle plugin (#1443)
* Add shuffle plugin

see #1437

* Change plugin to integrate into nu structure and build system
2020-03-03 08:44:12 +13:00
Jason Gedge
7304d06c0b
Use threads to avoid blocking reads/writes in externals. (#1440)
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.
2020-03-02 06:19:09 +13:00
Jonathan Turner
ca615d9389
Bump to 0.10.1 (#1442) 2020-03-01 20:59:13 +13:00
Corvus Corax
6d096206b6
Add support for compound shorthand flags (#1414)
* Break multicharacter shorthand flags into single character flags

* Remove shorthand flag test
2020-03-01 13:20:42 +13:00
Ryan Blecher
2a8cb24309
Add support for downloading unsupported mime types (#1441) 2020-03-01 13:14:36 +13:00
Shaurya Shubham
8d38743e27
Add docs for debug (#1438)
* Add docs for `debug`

* Put debug docs in right folder
Also fixed minor spacing problem
2020-03-01 04:09:28 +13:00
Benjamin Röjder Delnavaz
eabfa2de54
Let ls ignore permission errors (#1435)
* Create a function to create an empty directory entry

* Print an empty directory entry if permission is denied

* Fix rustfmt whitespace issues.

* Made metadata optional for `dir_entry_dict`.

Removed `empty_dir_entry_dict` as its not needed anymore.
2020-02-29 14:33:52 +13:00
Ryan Blecher
a86a0abb90
Plugin documentation (#1431)
* 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
2020-02-24 15:28:46 +13:00
Jonathan Turner
adcda450d5
Update LICENSE 2020-02-21 10:49:46 +13:00
Sean Hellum
147b9d4436
Add Better-TOML (#1417) 2020-02-19 16:59:42 -05:00
equal-l2
c43a58d9d6
Fix incorrect display for zero-size files (#1422) 2020-02-19 09:57:58 -05:00
Corvus Corax
e38442782e
Command documentation for du (#1416) 2020-02-19 09:55:22 +13:00
Sean Hellum
b98f893217
add a touch command (#1399) 2020-02-19 09:54:32 +13:00
Shaurya Shubham
bd6556eee1
Use proper file extension for uniq command docs (#1411) 2020-02-18 09:37:46 -05:00
Andrés N. Robalino
18d988d4c8
Restrict short-hand flag detection to exact match. (#1406) 2020-02-18 01:58:30 -05:00
Jonathan Turner
0f7c723672
Bump version to 0.10.0 (#1403) 2020-02-18 16:56:09 +13:00
Jonathan Turner
afce2fd0f9
Revert "Display rows in the same table regardless of their column order given they are equal. (#1392)" (#1401)
This reverts commit 4fd9974204.
2020-02-17 17:34:37 -08:00
Andrés N. Robalino
4fd9974204
Display rows in the same table regardless of their column order given they are equal. (#1392) 2020-02-16 20:35:01 -05:00
Shaurya Shubham
71615f77a7
Fix minor typo in calc command error (#1395) 2020-02-16 16:02:41 -05:00