nushell/crates/nu-cli/src
Leonhard Kipp c6fe58467b
Change alias shape inference to proposal of RFC#4 (#2685)
* Change alias shape inference to proposal of RFC#4

* Remove commented code

* Fix typo

* Change comment to be more informative

* Make match statement to lookup in table

* Remove resolved question

https://github.com/nushell/nushell/pull/2685#discussion_r509832054

* Pick ...or_insert_dependency functions into pieces

Previously there was get_shape_of_expr_or_insert dependency, now there is
get_shape_of_expr and get_shape_of_expr_or_insert_dependency

2 new functions have been added: get_result_shape_of_math_expr and
get_result_shape_of_math_expr_or_insert_dependency

* Remove flattening of deep binary expressions

Previously deep binary expressions have been flattened through the insertion of
fake vars. This logic was quite complicated. Now if a variable depends on the
result shape of a binary expression and the result shape can't be computed,
the variable simply depends on the whole binary.

* Change Expression::Variable(Variable::It(...)) to Expression::Variable(...)

* Simplify get_result_shapes_in_math_expr

* Simplify infer_shapes_in_binary_expr

* Clarify comment

* Clarify comment

* Fix clippy lint

* Move check for real var into checked_insert

* Remove comment

* Rename var
2020-10-29 06:49:38 +13:00
..
commands Change alias shape inference to proposal of RFC#4 (#2685) 2020-10-29 06:49:38 +13:00
completion Remove it expansion (#2701) 2020-10-26 19:55:52 +13:00
env Added -1 back when determining term_width (#2646) 2020-10-07 12:45:57 -05:00
evaluate Remove it expansion (#2701) 2020-10-26 19:55:52 +13:00
shell bump to 0.21.1 (#2702) 2020-10-26 21:10:06 +13:00
stream Add wasm support (#2199) 2020-07-18 13:59:23 +12:00
types Change alias shape inference to proposal of RFC#4 (#2685) 2020-10-29 06:49:38 +13:00
utils Consolidate suggestions code (#2597) 2020-09-25 15:44:24 +12:00
cli.rs Remove it expansion (#2701) 2020-10-26 19:55:52 +13:00
command_registry.rs Context cleanup (#2581) 2020-09-20 09:29:51 +12:00
commands.rs Add rounding functionalties (#2672) 2020-10-22 13:18:27 +13:00
deserializer.rs Remove panics from random integer and make the constraint more idiomatic (#2578) 2020-09-20 08:41:49 +12:00
documentation.rs Include subcommands in help commands (#2575) 2020-09-20 08:37:47 +12:00
env.rs WIP: Per directory env-variables (#1943) 2020-06-08 19:55:25 +12:00
evaluation_context.rs Refactor scope (#2602) 2020-09-26 11:40:02 +12:00
examples.rs Remove it expansion (#2701) 2020-10-26 19:55:52 +13:00
format.rs Nu table (#2015) 2020-06-20 15:41:53 +12:00
futures.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
git.rs Bump to 0.18.2. Move starship external. (#2345) 2020-08-14 07:02:45 +12:00
keybinding.rs Move nu-data out of nu-cli (#2369) 2020-08-18 19:00:02 +12:00
lib.rs Change alias shape inference to proposal of RFC#4 (#2685) 2020-10-29 06:49:38 +13:00
path.rs Changing the directory to '.' doesn't modify the prompt anymore (#2457) 2020-08-31 05:24:38 +12:00
plugin.rs Core nu plugin load capability. (#2544) 2020-09-14 09:07:02 -05:00
prelude.rs Move command changes. Refactorings. (#2683) 2020-10-20 04:07:13 -05:00
shell.rs Update rustyline to latest (#2565) 2020-09-17 18:02:30 +12:00
types.rs Change alias shape inference to proposal of RFC#4 (#2685) 2020-10-29 06:49:38 +13:00
utils.rs Consolidate suggestions code (#2597) 2020-09-25 15:44:24 +12:00