Commit graph

24 commits

Author SHA1 Message Date
Jonathan Turner
48a90fea70
Fix let-env (#3057) 2021-02-15 20:58:51 +13:00
Jonathan Turner
b202951c1d
fix prompts on startup (#3056)
* fix prompts on startup

* Try again
2021-02-15 20:14:16 +13:00
Saeed Rasooli
617341f8d5
nu-engine: deserialize_struct: fix missing conversion from string to column path (#3048) 2021-02-13 09:29:38 +13:00
Jonathan Turner
5481db4079
Fix latest clippy warnings (#3049) 2021-02-12 23:13:14 +13:00
Andrés N. Robalino
a5fefaf78b
Ensure selection of columns are done once per column (#3012) 2021-02-05 19:34:26 -05:00
Jonathan Turner
6f17662a4e
Update some deps (#3011) 2021-02-06 09:54:54 +13:00
Jonathan Turner
c83aea3c89
Bump to 0.26.1 (#3008) 2021-02-05 19:38:04 +13:00
Darren Schroeder
fd41fa31d5
add $nothing and tests (#2995) 2021-02-02 19:23:12 +13:00
Darren Schroeder
b052d524da
added pow operator, and filesize math (#2976)
* added pow operator, and filesize math

* removed + and - arms, removed some pow, pow higher precedence

* Update value.rs

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
2021-01-29 07:44:02 -06:00
Darren Schroeder
47c4b8e88a
allow str from to convert more things to string (#2977)
* allow str from to convert more things to string

* fixed FileSize so it reports with units configured

* added tests
2021-01-29 07:43:35 -06:00
Jonathan Turner
388973e9ab
Bump to 0.26.0 (#2974) 2021-01-26 23:07:08 +13:00
Joseph T. Lyons
9fd92512a2
Use equality assert macros (#2969) 2021-01-25 18:16:10 +13:00
Jonathan Turner
52dc04a35a
Error on bad row in column path (#2964)
* Error on bad row in column path

* Add more pathing tests
2021-01-22 18:14:13 -05:00
Jonathan Turner
a4b8d4a098
Add rest support to blocks (#2962) 2021-01-23 10:28:32 +13:00
Leonhard Kipp
71b99edd48
parser/add rest args to def (#2961)
* Add rest arg to def

This commit applied adds the ability to define the rest parameter of a def
command. It does not implement the functionality to expand the rest argument in
a user defined def function.

The rest argument has to be exactly worded "...rest".

Example after this PR is applied:

file test.nu
```shell
def my_command [
    ...rest:int # My rest arg
] {
    echo 1 2 3
}
```

```shell
> source test.nu
> my_command -h
Usage:
  > my_command ...args {flags}

Parameters:
  ...args: My rest arg

Flags:
  -h, --help: Display this help message
```

* Fix space in help on wrong side
2021-01-23 07:13:29 +13:00
Leonhard Kipp
fec50d8cfe
Fix bug #2921 (#2945)
* Fix bug #2921

Moving whether a range should be parsed further back, giving e.G. parsing of
invocations precedence fixes the bug

* Add test
2021-01-21 07:58:37 +13:00
Caden Haustein
430da53f0b
Replace dirs and directories with maintained (#2949) 2021-01-19 14:24:27 -06:00
Anders Rasmussen
ebc4694e05
move keybinding_path to nu-data (#2927) 2021-01-14 06:31:47 +13:00
Coen Fox
a636f161a4
Add dirs dependency to nu-engine (#2922)
* Add dirs dependency to nu-engine

* Dir feature should be added to root features
2021-01-13 10:18:13 +13:00
Coen Fox
3be198d2f5
Don't print description in help if none exists (#2915) 2021-01-13 07:27:48 +13:00
Jonathan Turner
7d07881d96
Bump to 0.25.2 (#2908) 2021-01-12 07:50:53 +13:00
Michael Angerman
481c6d4511
nu_cli refactor in preparation for a crate called nu_command (#2907)
* move basic_shell_manager to nu-engine

* move basic_evaluation_context to nu-engine

* fix failing test in feature which commands/classified/external.rs
2021-01-11 17:58:15 +13:00
Darren Schroeder
231a445809
working for comparing filepath to string (#2906)
* working for comparing filepath to string

* added tests
2021-01-11 16:41:19 +13:00
Jonathan Turner
93e8f6c05e
Split nu-cli into nu-cli/nu-engine (#2898)
We split off the evaluation engine part of nu-cli into its own crate. This helps improve build times for nu-cli by 17% in my tests. It also helps us see a bit better what's the core engine portion vs the part specific to the interactive CLI piece.

There's more than can be done here, but I think it's a good start in the right direction.
2021-01-10 15:50:49 +13:00