1
0
mirror of https://github.com/nushell/nushell.git synced 2025-01-21 05:40:59 +01:00
Commit Graph

3204 Commits

Author SHA1 Message Date
Darren Schroeder
9776a252ee
add addition characters that can be hard to work with in nushell () 2021-05-21 08:04:48 -05:00
JT
751de20f93
Do a bit more cleanup of block params ()
* Do a bit more cleanup of block params

* Do a bit more cleanup of block params
2021-05-21 19:04:27 +12:00
JT
28388b4e3a
Split unit into duration and filesize () 2021-05-21 13:21:46 +12:00
JT
4fdbf30308
Paren interpolation ()
* Switch interp to use parens

* improve interp parsing
2021-05-21 10:55:38 +12:00
Darren Schroeder
722f191e82
updated round to support i64 () 2021-05-20 13:59:19 -05:00
JT
20f6114617
Improve block params () 2021-05-20 16:26:54 +12:00
Jakub Žádník
3075e2cfbf
Remove rest_args() from evaluated CommandArgs ()
It was too error prone when positional arguments were used with the rest
arguments. Now, you need to explicitly state from which position you
want to count the rest args (e.g., `rest(0)`).
2021-05-20 10:26:23 +12:00
JT
e2973d2176
Add explicit block params ()
* Add explicit block params

* Add explicit block params
2021-05-19 20:23:45 +12:00
JT
0ff08bb63a
Just treat u64 like i64 for now () 2021-05-19 09:32:37 +12:00
Jakub Žádník
08c0bf52bc
Fix path join argument type and a typo () 2021-05-19 09:30:37 +12:00
Fernando Herrera
d0229cb96e
Load parquet and json files ()
* Load parquet and json files

* changed csv file error
2021-05-19 07:33:10 +12:00
Darren Schroeder
0612e5ccfb
updated to the latest rustyline () 2021-05-18 12:36:55 -05:00
Darren Schroeder
1b4f7b34c8
don't let externals break ansi escapes () 2021-05-17 18:01:34 -05:00
Alex Shadley
86e6fcd309
Negative indexing for range ()
* adds negative indexing to range

* fixes tests to reflect new parsing changes

* removes duplicate definitons

* fmt
2021-05-17 15:08:47 +12:00
Marc Schreiber
dc9cd7d8b9
Add Support for Partial Completions ()
This commit adds a conditional event handler that inserts the next word of the
hint text when the user presses control and right arrow.
2021-05-16 08:43:43 +12:00
Fernando Herrera
c0cc9ce7cd
Dataframe new commands ()
* Folder for dataframe commands

* New commands for dataframe
2021-05-15 19:24:11 +12:00
Darren Schroeder
be2f66397b
re-enable ansi support when externals break it () 2021-05-15 16:11:21 +12:00
Fernando Herrera
07760b4129
Commands to engine p ()
* hash and into converted

* keep command to engine p

* Update int.rs

Co-authored-by: JT <jonathandturner@users.noreply.github.com>
2021-05-15 16:11:07 +12:00
JT
d79a3130b8
Make the default int an i64 ()
* Make the default int an i64

* fmt

* Fix random integer

* Treat pids as i64 for now
2021-05-14 20:35:09 +12:00
Darren Schroeder
440a589f9e changed comment slightly 2021-05-13 14:21:16 -05:00
Fernando Herrera
f5fcf9d635
Dataframe feature for plugins () 2021-05-13 21:49:46 +12:00
JT
9b8b1bad57
Don't insert PATH variable on Windows ()
* Don't insert PATH variable on Windows

* Simplify fix

* Just centralize the var

* Add a message about why we have to workaround the issue
2021-05-13 15:03:49 +12:00
Sympatron GmbH
874ecd6c88
Made completion matching case-insensitive by default for windows () 2021-05-13 11:38:43 +12:00
JT
57e2fec497
Update LICENSE 2021-05-13 07:44:36 +12:00
Fernando Herrera
0905a2c3a2
commands to engine p ()
* commands to engine p

* Clippy suggestion

* Clippy suggestion
2021-05-13 07:07:20 +12:00
JT
3aa00b78f9
Improve missing var in var-path error () 2021-05-12 20:53:34 +12:00
JT
6769d46dbb
Do less work in sys () 2021-05-12 17:24:22 +12:00
JT
efac712f62
Fix string interp/shorthand overlap () 2021-05-12 16:20:29 +12:00
JT
2bb23c57df
Bump to 0.31.1 () 2021-05-12 15:06:50 +12:00
Fernando Herrera
bc699a2cc1
date commands ported () 2021-05-12 14:01:49 +12:00
Fernando Herrera
758c128147
Config commands to engine p ()
* config get command

* config remove command

* config set command

* config command

* config commands
2021-05-12 14:01:16 +12:00
Alex Shadley
3795c2a39d
Migrate last to engine-p ()
* migrates last to engine-p

* removes unused import

* linter fix

* switch to as_usize()
2021-05-12 13:59:08 +12:00
JT
311c0e3f50
Simplify string interpolation ()
* [DRAFT] simplify string interpolation

* Fix test
2021-05-12 13:53:57 +12:00
JT
25a8caa9b0
Simplify expressions ()
* WIP: experiment with simpler expressions

* fix simple invoke

* update tests

* fix a few tests

* Make paren parsing more robust

* fix external args

* Remove old invocation

* Update tests

* Update tests
2021-05-12 13:01:48 +12:00
Fernando Herrera
c80a9585b0
Complete Dataframe MVP ()
* Dataframe MVP

* Removed test csv file

* Dataframe MVP

* Removed test csv file

* New revision polars

* New revision polars

* csv file reader

* argument parser for file reader

* Parser from Row primitive

* Column conversion

* Added as f32 and f64

* Parsing row to dataframe

* Removed repeated push to vector

* Accept table values to create dataframe

* Removed default serde

* Dataframe to rows to show data

* Save name of file with dataframe

* Usage example

* Upgrade polars version

* Clippy changes

* Added print function with head and tail

* Move dataframe struct to folder

* Lock file after running tests and merge

* Optional feature for dataframe

* Removed dataframe from plugins

* Update primitive.rs

Co-authored-by: JT <jonathandturner@users.noreply.github.com>
2021-05-12 13:01:31 +12:00
Darren Schroeder
e73491441a
make seq more nu-like by returning numbers when possible () 2021-05-11 12:02:16 -05:00
Nate Mara
b93b80ccaa
Remove unnecessary work from ps ()
The ps plugin has an unnecessary call to `std:🧵:sleep(500ms)` that
delays runtime by 500ms. Additionally, there is a call to
`sysinfo::SystemExt::refresh_process`, which is not required as the previous
call to sysinfo::SystemExt::refresh_all handles the "refresh" of all processes
without a need to do this individually. Combining both of these improvements
means that running ps runs nearly instentaneously.

Fixes 
2021-05-11 19:59:24 +12:00
JT
48128c9db6
Bump to 0.31.0 () 2021-05-11 16:44:52 +12:00
Fernando Herrera
6dafaa197d
Commands to engine p ()
* Change ansi command

* Change ansi strip command

* Change benchmark to engine-p

* ansi strip removed arg.process()

* benchmark without process args
2021-05-11 16:03:55 +12:00
Darren Schroeder
1634d8e087
add into string () 2021-05-10 12:58:51 -05:00
Jakub Žádník
7a583083b8
Convert the rest of "random" subcommands to engine-p ()
* Convert "random bool" to engine-p

Also implements FromValue for Tagged<BigDecimal> and Tagged<f64>.

* Convert "random dice" to engine-p

* Convert "random uuid" to engine-p

* Covert "random chars" to engine-p

* Convert "random" command to engine-p
2021-05-10 19:07:57 +12:00
Michael Angerman
75156ab0c9
engine-p: build-string remove ActionStream () 2021-05-08 16:59:12 +12:00
Jakub Žádník
9fd6923821
Port random integer & decimal to engine-p + related refactoring ()
* Implement minmax for Range; Simplify range command

* Port random integer to enginep; New FromValue impl

Now, FromValue is implemented for Tagged<Range> to allow extracting args
into this type.

* Make sure range value extraction fails properly

The range endpoint extraction methods now return error instead of
silently clipping the value. This now makes `random integer ..-4` fail
properly since -4 can't be cast as u64.

* Port random decimal to enginep & Refactor

This added a way to interpret Range limits as f64 and a Primitive helper
to get its value as f64.

A side effect of this commit is that it is now possible to specify the
command bounds as true decimals. E.g., `random decimal 0.0..3.14` does
not clip 3.14 to 3.
2021-05-08 07:58:12 +12:00
JT
91a929b2a9
Clippy fixes for new Rust version () 2021-05-07 07:58:21 +12:00
Rafael Lúcio
0f8e31af06
Juicy features cargo installer wrapper ()
* Juicy features cargo installer wrapper

* Remove `--force` parameter
2021-05-06 18:55:47 +12:00
Javier Goday
bd71c2f34d
: Add ignore-case and duplicated options to uniq command ()
* : Add ignore-case and duplicated options to uniq command

* rustfmt
2021-05-06 12:07:42 +12:00
onthebridgetonowhere
001123dbd6
Add first prototype of functionality to parse numbers in parantheses ()
* Add first prototype of functionality to parse numbers in parantheses (). Needs testing and more wide-testing+integration

* Fix styling issue

* Try something else by copying existing matching code

* Fix formatting

* Fix the parser to accept numbers in paranthesis. Not really happy with the code, but let's see

* Refactor to only use once the parsing of strings into numbers

* Remove errors that are not used

* Fix formatting

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-05-06 09:00:55 +12:00
ammkrn
cfee151d4e
Dont unwrap rustyline helper in cli ()
If nu fails to load a user config on startup, no helper is set and the
later call to `rl.helper_mut()` will panic. There may be better ways to
handle this long-term, but printing an error about the failure to parse
the config and then starting with default values seems reasonable.
2021-05-04 15:50:38 +12:00
JT
fc59291191
Simplify down to one type of context ()
* Simplify down to one type of context

* More simplification
2021-05-03 11:45:55 +12:00
Jakub Žádník
4fc05cac56
Port range to engine-p ()
* Removes arg serialization
* action stream -> output stream
* uses nu_protocol::Range instead of NumericRange
* random missing newline I found in the code
2021-05-03 07:47:59 +12:00