Sam Hedin
2f4f8632de
nicer errors
2020-06-16 11:01:11 +02:00
Sam Hedin
4e0a0df8a8
Error handling and refactoring
2020-06-15 21:38:33 +02:00
utam0k
831111edec
Pass the borrow instead of clone. ( #1986 )
2020-06-16 05:35:24 +12:00
Sam Hedin
06b1122564
Working?
2020-06-15 18:31:04 +02:00
Sam Hedin
28f01e92b7
Deletion almost works
2020-06-15 18:21:27 +02:00
Sam Hedin
6a0b4d1122
Add type aliases for String and OsString
2020-06-15 18:15:30 +02:00
Sam Hedin
26ec9cf432
Clippy
2020-06-15 15:48:14 +02:00
Sam Hedin
730f9ca30a
Error handling
2020-06-15 15:42:09 +02:00
Jonathan Turner
29ea29261d
Bump to 0.15.1 ( #1984 )
2020-06-15 09:54:30 +12:00
Jonathan Turner
ee835f75db
Last batch of removing async_stream ( #1983 )
2020-06-15 09:00:42 +12:00
Arash Outadi
bd7ac0d48e
Math Documentation ( #1982 )
...
* Adding math docs
* Add some comments to calculate
* Remove redudant message
Message already shows up in subcommands list
* Added not working example
Accidentantly
* Remove table
2020-06-15 08:42:15 +12:00
Sam Hedin
309f5e02a0
Performance concerns
2020-06-14 15:10:21 +02:00
Sam Hedin
97bad0e4de
Untrack removed vars properly
2020-06-14 12:18:45 +02:00
Sam Hedin
3fbbe6e322
Refactor restore function
2020-06-14 11:37:20 +02:00
Sam Hedin
0beb32de52
Overwritten env values tracks an indexmap instead of vector
2020-06-14 10:48:08 +02:00
Jonathan Turner
d7b1480ad0
Another batch of removing async_stream ( #1981 )
2020-06-14 11:54:35 +12:00
Jonathan Turner
86b316e930
Another batch of removing async_stream ( #1979 )
...
* Another batch of removing async_stream
* Another batch of removing async_stream
* Another batch of removing async_stream
2020-06-14 10:01:44 +12:00
Arash Outadi
a042f407c1
1882-Add min, max in addition to average for acting lists ( #1969 )
...
* Converting average.rs to math.rs
* Making some progress towards math
Examples and unit tests failing, also think I found a bug with passing in strings
* Fix typos
* Found issue with negative numbers
* Add some comments
* Split commands like in split and str_ but do not register?
* register commands in cli
* Address clippy warnings
* Fix bad examples
* Make the example failure message more helpful
* Replace unwraps
* Use compare_values to avoid coercion issues
* Remove unneeded code
2020-06-14 09:49:57 +12:00
Sam Hedin
3ed608d9da
Merge branch 'master' of github.com:nushell/nushell
2020-06-13 22:10:12 +02:00
Jonathan Turner
40673e4599
Another batch of removing async_stream ( #1978 )
2020-06-14 07:13:36 +12:00
Joseph T. Lyons
bcfb084d4c
Remove async_stream from some commands ( #1976 )
2020-06-14 04:30:24 +12:00
Jonathan Turner
fe6d96e996
Another batch of converting commands away from async_stream ( #1974 )
...
* Another batch of removing async_stream
* merge master
2020-06-13 20:43:21 +12:00
Joseph T. Lyons
e24e0242d1
Removing async_stream! from some more commands ( #1973 )
...
* Removing async_stream! from some more commands
* Fix await error
* Fix Clippy warnings
2020-06-13 20:03:13 +12:00
Jonathan Turner
c959dc1ee3
Another batch of removing async_stream ( #1972 )
2020-06-13 16:03:39 +12:00
Jonathan Turner
d82ce26b44
Another batch of removing async_stream ( #1971 )
2020-06-13 11:40:23 +12:00
Jonathan Turner
935a5f6b9e
Another batch of removing async_stream ( #1970 )
2020-06-12 20:34:41 +12:00
Darren Schroeder
731aa6bbdd
use encoding on open for #1939 ( #1949 )
...
* WIP - not compiling
* compiling but panicing
* still broken
* nearly working
* reverted deserializer_string changes
updated enter.rs and open.rs to use Option<Tagged<String>>
Accepted Clippy suggestions
Accepted fmt suggestions
Left original code from open.rs
We may want to use some of it and only fallback to encoding.
* Don't exit when there is an unknown encoding.
* When encoding is unknown default to utf-8.
* only do encoding if the user says to it
* merged some conflicts on open
* made error messages consistent
* Updated unwrap with expect
* updated open test to pass with more descriptive err
updated enter test to not fail
* change _location to location
* changed _visitor to visitor
* Added a more verbose usage statement for encoding
Linked to docs.rs/encoding_rs for details
Co-authored-by: Darren Schroeder <fdncred@hotmail.com>
2020-06-11 19:37:43 -05:00
Jonathan Turner
a268e825aa
Allow config to be readonly ( #1967 )
2020-06-12 05:50:57 +12:00
Jonathan Turner
982f067d0e
Proper precedence history in math ( #1966 )
2020-06-12 05:17:08 +12:00
Sam Hedin
f6458b4322
Merge branch 'master' of github.com:nushell/nushell
2020-06-10 08:37:17 +02:00
Sam Hedin
862ff60b3e
rewrite everything
2020-06-10 08:33:04 +02:00
Jonathan Turner
e5a18eb3c2
Bump to 0.15.0 ( #1955 )
2020-06-10 05:33:59 +12:00
Sam Hedin
2fcde8daa9
Rewrite starting
2020-06-09 10:42:27 +02:00
Sam Hedin
a40ed5fef2
Change list of allowed dirs to indexmap
2020-06-09 07:00:22 +02: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
Sam Hedin
5a85a3448e
Add comment to clarify how overwritten values are restored.
2020-06-08 07:05:12 +02: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
Sam Hedin
99824d864c
Rename whitelisted_directories to allowed_directories
2020-06-08 06:16:44 +02: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
Sam Hedin
fe16db6a2f
FORMAT PLZ
2020-06-07 09:03:04 +02:00
Sam Hedin
aaacf4c336
Better error messages, remove last (?) unwrap
2020-06-07 08:56:22 +02:00
Sam Hedin
c5b8abbcd3
cargo fmt
2020-06-07 08:36:06 +02:00
Sam Hedin
e1581ec156
Cleanup and handle errors
2020-06-07 08:29:58 +02:00
Sam Hedin
ff742ed675
Clippy
2020-06-07 06:55:38 +02: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
Sam Hedin
e4c951fe93
Rename config function
2020-06-06 13:26:42 +02:00
Sam Hedin
d6e1a0e616
Remove vars after leaving dir
2020-06-06 12:53:45 +02:00
Sam Hedin
03febb8cab
Formatting
2020-06-06 12:19:20 +02:00
Sam Hedin
3c3ee08ffe
Update comments and change var name
2020-06-06 12:17:01 +02:00
Sam Hedin
dc8d82628b
Merge branch 'master' of github.com:nushell/nushell
2020-06-06 11:54:54 +02:00
Sam Hedin
4fdc3646e8
Working?
2020-06-06 11:54:33 +02:00
Sam Hedin
c618538cf8
Working?
2020-06-06 11:45:58 +02: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
Sam Hedin
6974eb0994
Restore env values
2020-06-06 08:19:16 +02:00
Sam Hedin
a0cedfce8d
Refactor from_config
2020-06-06 06:27:28 +02:00
Sam Hedin
6ce5a87c30
Move directory environment code to separate file
2020-06-06 06:02:15 +02:00
Sam Hedin
14e12f57b0
Refactor env_vars_to_add()
2020-06-06 05:48:25 +02:00
Sam Hedin
fb6eb1924f
Refactor env_vars_to_delete
2020-06-06 03:51:50 +02:00
Sam Hedin
3a278b38da
Removing vars works, but not done in a very nice fashion
2020-06-06 02:54:27 +02:00
Sam Hedin
8498c673bd
Refactoring
2020-06-06 02:10:36 +02:00
Sam Hedin
0ee54a3418
Rename .nurc to .nu
2020-06-05 05:31:52 +02:00
Sam Hedin
da2751da54
I am in a state of distress
2020-06-05 04:58:50 +02:00
Sam Hedin
0f0485957a
Parse config directories
2020-06-05 04:00:52 +02:00
Sam Hedin
e97e883d1f
Move work to cli.rs
2020-06-05 01:23:55 +02:00
Sam Hedin
3aeddee2fe
Add and remove env var behavior appears correct
...
However, it does not use existing code that well.
2020-06-04 23:43:26 +02:00
Sam Hedin
0728c23ec0
Merge branch 'master' of github.com:nushell/nushell
2020-06-04 23:18:40 +02:00
Sam Hedin
24d2e88e0f
Debug by logging to file
2020-06-04 23:17:55 +02: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
Sam Hedin
fe4a51eef4
Debugging
2020-06-04 05:31:37 +02:00
Sam Hedin
6e72386360
Refactoring, add comment
2020-06-04 05:30:28 +02:00
Sam Hedin
de0c252e27
Removing vals not working, strangely
2020-06-04 04:37:02 +02:00
Sam Hedin
c67d93dae1
Delete env vars after leaving directory
2020-06-04 04:02:54 +02:00
Sam Hedin
48e4bb60d0
Parse .nurc file
2020-06-04 02:14:49 +02:00
Sam Hedin
8eaaddca8f
Add add_nurc to sync_env command
2020-06-04 01:16:07 +02:00
Sam Hedin
3d15ac076c
Working dummy version
2020-06-04 01:13:04 +02:00
Sam Hedin
83795a3e70
Add args in .nurc file to environment
2020-06-04 01:07:39 +02: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
Jonathan Turner
ef4eefa96a
Bump more deps ( #1921 )
2020-05-31 08:54:47 +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
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
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
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
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