Commit Graph

2329 Commits

Author SHA1 Message Date
svartalf
16ba274170
Bump heim dependency version. (#1954)
Most important change is a fix for processes CPU usage calculation (see https://github.com/heim-rs/heim/issues/246)
2020-06-10 04:34:05 +12:00
Jonathan Turner
3bb2c9beed
Rename env file to .nu-env (#1953) 2020-06-09 15:54:20 +12:00
Michael Nitschinger
2fa83b0bbe
Pub expose InterruptibleStream and InputStream. (#1952)
This allows crate users to make sure their long-running
streams can be interrupted with ctrl-c.
2020-06-09 05:17:19 +12:00
Sam Hedin
bf459e09cb
WIP: Per directory env-variables (#1943)
* Add args in .nurc file to environment

* Working dummy version

* Add add_nurc to sync_env command

* Parse .nurc file

* Delete env vars after leaving directory

* Removing vals not working, strangely

* Refactoring, add comment

* Debugging

* Debug by logging to file

* Add and remove env var behavior appears correct

However, it does not use existing code that well.

* Move work to cli.rs

* Parse config directories

* I am in a state of distress

* Rename .nurc to .nu

* Some notes for me

* Refactoring

* Removing vars works, but not done in a very nice fashion

* Refactor env_vars_to_delete

* Refactor env_vars_to_add()

* Move directory environment code to separate file

* Refactor from_config

* Restore env values

* Working?

* Working?

* Update comments and change var name

* Formatting

* Remove vars after leaving dir

* Remove notes I made

* Rename config function

* Clippy

* Cleanup and handle errors

* cargo fmt

* Better error messages, remove last (?) unwrap

* FORMAT PLZ

* Rename whitelisted_directories to allowed_directories

* Add comment to clarify how overwritten values are restored.
2020-06-08 19:55:25 +12:00
Joseph T. Lyons
ec7ff5960d
Remove async_stream! from some commands (#1951)
* Remove async_stream! from open.rs

* Ran rustfmt

* Fix Clippy warning

* Removed async_stream! from evaluate_by.rs

* Removed async_stream! from exit.rs

* Removed async_stream! from from_eml.rs

* Removed async_stream! from group_by_date.rs

* Removed async_stream! from group_by.rs

* Removed async_stream! from map_max.rs

* Removed async_stream! from to_sqlite.rs

* Removed async_stream! from to_md.rs

* Removed async_stream! from to_html.rs
2020-06-08 16:48:10 +12:00
Arash Outadi
545f70705e
ISSUE-1907 Disallow invalid top level TOML (#1946)
* Do not allow invalid top-level toml

Move recursive toml conversion into a helper func

* Forgot to format

* Forgot to use helper inside collect values

Added some additional tests
2020-06-08 08:02:37 +12:00
utam0k
48672f8e30
Assign variables when passed as an argument. (#1947) 2020-06-08 04:15:57 +12:00
Joseph T. Lyons
160191e9f4
Cal updates (#1945)
* Clean up `use` statements

* Update cal code to be ready for future data coloring
2020-06-07 15:52:42 +12:00
Joseph T. Lyons
bef9669b85
When the nushell is located in a path that has a space in it, these tests break, this fixes it (#1944) 2020-06-07 15:50:52 +12:00
utam0k
15e66ae065
Implement an option to show paths made of mkdir. (#1932) 2020-06-06 15:13:38 -04:00
Joseph T. Lyons
ba6370621f
Removing async_stream! from some commands (#1940)
* Removing async_stream! from some commands

* Revert row.rs code

* Simplify logic for first.rs and skip.rs
2020-06-06 19:42:06 +12:00
Andrés N. Robalino
2a8ea88413 Bring back parse as built-in. 2020-06-04 15:21:13 -05:00
Jonathan Turner
05959d6a61
Bump to latest rustyline (#1937) 2020-06-05 05:50:12 +12:00
Joseph T. Lyons
012c99839c
Moving some commands off of async stream (#1934)
* Remove async_stream from rm

* Remove async_stream from sort_by

* Remove async_stream from split_by

* Remove dbg!() statement

* Remove async_stream from uniq

* Remove async_stream from mkdir

* Don't change functions from private to public

* Clippy fixes

* Peer-review updates
2020-06-04 20:42:23 +12:00
utam0k
5dd346094e
Cut out a function to generate a pharase in the Flags section. (#1930) 2020-06-04 19:09:43 +12:00
Darren Schroeder
b6f9d0ca58
Remove no_auto_pivot (#1931)
no_auto_pivot does not exist any longer. It was rolled into pivot_mode.
2020-06-03 12:27:54 -04:00
Rohan Rout
ae72593831
changed to-float to to-decimal (#1926)
* changed to-float to to-decimal

* changed to-float to to-decimal
2020-06-02 09:02:57 +12:00
John Axel Eriksson
ac22319a5d
Update Cargo.lock (#1923) 2020-06-02 04:32:24 +12:00
utam0k
7e8c84e394
Bump actions/checkout version from v1 to v2. (#1924) 2020-06-02 04:31:48 +12:00
Jonathan Turner
ef4eefa96a
Bump more deps (#1921) 2020-05-31 08:54:47 +12:00
Jonathan Turner
2dc43775e3
Bump to latest heim (#1920)
* Bump to latest heim

* Fix pinning issue
2020-05-31 08:54:33 +12:00
Jonathan Turner
4bdf27b173
Batch of moving commands off async_stream #3 (#1919)
* Batch of moving commands off async_stream #3

* remove commented-out section

* merge master
2020-05-31 06:31:50 +12:00
Oleksii Filonenko
741d7b9f10
Add rm_always_trash option to config (#1869)
* Add `rm_always_trash` option to config

* Add `--permanent` flag to `rm`

* `rm`: error if both `-t` and `-p` are present

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
2020-05-31 06:31:34 +12:00
Arash Outadi
ecb67fee40
ISSUE-1744-Glob support for start command (#1912)
* Possible implementation of globbing for start command

* Whoops forgot to remove Error used for debugging

* Use string lossy

* Run clippy

* Pin glob

* Better error messages

* Remove unneeded comment
2020-05-31 05:41:25 +12:00
Andrés N. Robalino
ad43ef08e5 Support average for tables. 2020-05-30 10:33:09 -05:00
Jonathan Turner
092ee127ee
Batch of moving commands off async_stream (#1917) 2020-05-30 16:34:39 +12:00
Jonathan Turner
b84ff99e7f
Batch of moving commands off async_stream (#1916) 2020-05-30 11:36:04 +12:00
Tobias Tschinkowitz
3a6a3d7409
Implement login for the fetch command (#1915) 2020-05-30 11:22:38 +12:00
Andrés N. Robalino
48ee20782f Ensure end_filter plugin lifecycle stage gets called. 2020-05-29 04:03:25 -05:00
Jonathan Turner
360e8340d1
Move run to be async (#1913) 2020-05-29 20:22:52 +12:00
Darren Schroeder
fbc0dd57e9
Add plugin_dir to docs (#1911) 2020-05-29 08:46:27 +12:00
Jonathan Turner
3f9871f60d
Simplify plugin directory scanning (#1910) 2020-05-29 07:14:32 +12:00
Andrés N. Robalino
fe01a223a4 Str plugin promoted to built-in Nu command. 2020-05-28 11:18:58 -05:00
Jason Gedge
0a6692ac44
Simplify parse plugin code. (#1904)
Primarily, instead of building a parse pattern enum, we just build the regex
directly, with the appropriate capture group names so that the column name
codepaths can be shared between simple and `--regex` patterns.

Also removed capture group count compared to column name count. I don't think
this codepath can possibly be reached with the regex we now use for the
simplified capture form.
2020-05-28 09:58:06 -04:00
Jonathan Turner
98a3d9fff6
Allow echo to iterate ranges (#1905) 2020-05-28 06:07:53 +12:00
Jonathan Turner
e2dabecc0b Make it-expansion work when in a list (#1903) 2020-05-27 20:29:05 +12:00
Joseph T. Lyons
49b0592e3c
Implement ctrl+c for the du command (#1901)
* Implement ctrl+c for the du command

* Ignore the "too many arguments" Clippy warning
2020-05-27 16:52:20 +12:00
Jonathan Turner
fa812849b8
Fix warnings and split Scope (#1902) 2020-05-27 16:50:26 +12:00
k-brk
9567c1f564
Fix for inconsistency when quoted strings are used with with_env shorthand (#1900) 2020-05-26 15:03:55 -04:00
Joseph T. Lyons
a915471b38
Cal documentation updates (#1895) 2020-05-26 07:21:36 -04:00
Ryan Blecher
bf212a5a3a
change the test to use the origin column (#1878) 2020-05-25 18:50:54 -04:00
Darren Schroeder
f0fc9e1038
Merge pivot options (#1888) 2020-05-25 18:40:25 -04:00
Jason Gedge
cb6ccc3c5a
Improve the simplified parse form. (#1875) 2020-05-25 14:19:49 -04:00
Joseph T. Lyons
07996ea93d
Remove as many of the typecasts as possible in the cal command (#1886)
* Remove as many of the typecasts as possible in the cal command

* Run rustfmt on cal.rs
2020-05-25 18:51:23 +12:00
Jonathan Turner
c71510c65c
Update CODE_OF_CONDUCT.md 2020-05-25 18:50:14 +12:00
Jonathan Turner
9c9941cf97
Update CODE_OF_CONDUCT.md 2020-05-25 18:49:36 +12:00
Jason Gedge
005d76cf57
Fix broken ordering of args when parsing command with env vars. (#1841) 2020-05-24 19:26:27 -04:00
k-brk
8a99d112fc
Add --to-float to str plugin (#1872) 2020-05-24 18:11:49 -04:00
Jörn Zaefferer
fb09d7d1a1
docs: add alias --save flag (#1874) 2020-05-24 13:42:20 -04:00
Shaarad Dalvi
9c14fb6c02
Show error when trying to sort by invalid column (#1880)
* Show error when trying to sort by invalid column

* Added test for changes

* Addressed comments, updated test

* Removed unnecessary mutable keyword

* Changed split-column to solt column after rebase from upstream
2020-05-25 05:37:08 +12:00