Simplify expressions (#3389)

* 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
This commit is contained in:
JT
2021-05-12 13:01:48 +12:00
committed by GitHub
parent c80a9585b0
commit 25a8caa9b0
38 changed files with 181 additions and 364 deletions

View File

@ -48,7 +48,7 @@ Some text
The style used by `textview` can be configured in `config.toml`.
```shell
> open --raw $(which nu | get path) | autoview
> open --raw (which nu | get path) | autoview
...
126d1c0: 64 31 66 37 62 30 31 63 36 2e 31 31 38 2e 6c 6c d1f7b01c6.118.ll
126d1d0: 76 6d 2e 34 34 38 37 35 37 31 32 34 39 35 33 39 vm.4487571249539

View File

@ -56,7 +56,7 @@ We want to add two totals (numbers `33` and `37`) for the day `2020/04/16`
Set a table with two numbers for the empty column
```shell
> echo [[2020/04/16 2020/07/10 2020/11/16]; ['' [27] [37]]] | empty? 2020/04/16 { = [33 37] }
> echo [[2020/04/16 2020/07/10 2020/11/16]; ['' [27] [37]]] | empty? 2020/04/16 { [33 37] }
═══╦════════════════╦════════════════╦════════════════
# ║ 2020/04/16 ║ 2020/07/10 ║ 2020/11/16
═══╬════════════════╬════════════════╬════════════════
@ -66,7 +66,7 @@ Set a table with two numbers for the empty column
Checking all the numbers
```shell
> echo [[2020/04/16 2020/07/10 2020/11/16]; ['' [27] [37]]] | empty? 2020/04/16 { = [33 37] } | pivot _ totals | get totals
> echo [[2020/04/16 2020/07/10 2020/11/16]; ['' [27] [37]]] | empty? 2020/04/16 { [33 37] } | pivot _ totals | get totals
═══╦════
033
137