Commit Graph

948 Commits

Author SHA1 Message Date
Justin
7cafdc9675
Merge branch 'nushell:main' into main 2021-10-10 13:15:54 -07:00
JT
89267df9eb
Merge pull request #115 from kubouch/hiding-rehaul
Hiding rehaul
2021-10-11 07:38:53 +13:00
JT
ecee5a9845
Update chars.rs 2021-10-11 07:28:33 +13:00
Jakub Žádník
77c520e10b Make predeclarations scoped; Add hiding tests
In some rare cases, the global predeclarations would clash, for example:

  > module spam { export def foo [] { "foo" } }; def foo [] { "bar" }

In the example, the `foo [] { "bar" }` would get predeclared first, then
the predeclaration would be overwritten and consumed by `foo [] {"foo"}`
inside the module, then when parsing the actual `foo [] { "bar" }`, it
would not find its predeclaration.
2021-10-10 14:31:13 +03:00
Jakub Žádník
40741254f6 Rewrite hiding system
Hiding definitions now should work correctly with repeated use of 'use',
'def' and 'hide' keywords.

The key change is that 'hide foo' will hide all definitions of foo
that were defined/used within the scope (those from other scopes are
still available). This makes the logic simpler and I found it leads to a
simpler mental map: you don't need to remember the order of defined/used
commands withing the scope -- it just hides all.
2021-10-10 13:18:47 +03:00
jacremer
0b35905ce9 revert temp val 2021-10-09 22:43:50 -07:00
xiuxiu62
beb15dcc77 cleanup + clippy suggestions 2021-10-09 21:17:08 -07:00
xiuxiu62
97ca242634 add rm command + stubs for open and save 2021-10-09 21:13:15 -07:00
JT
53f3d2572c
Merge pull request #107 from arthur-targaryen/in-not-in-operators
Add `in` and `not-in` operators support
2021-10-10 07:09:25 +13:00
Arthur Targaryen
a0a63c966f Add inline attribute and address warning 2021-10-09 19:44:03 +02:00
Arthur Targaryen
d5fdfdb614 Add missing test attribute 2021-10-09 19:40:47 +02:00
Arthur Targaryen
75de7f7e61 Implement PartialOrd for Value::Stream 2021-10-09 19:40:47 +02:00
Arthur Targaryen
4e443b2088 Change helper method visibility 2021-10-09 19:40:47 +02:00
Arthur Targaryen
9e7e8ed48f Handle not-in operator 2021-10-09 19:40:47 +02:00
Arthur Targaryen
5f9ad0947d Fix Range::contains 2021-10-09 19:40:47 +02:00
Arthur Targaryen
4235cf1191 Implement and use PartialOrd for Value 2021-10-09 19:40:45 +02:00
Arthur Targaryen
357b9ccaa9 Remove unused import 2021-10-09 19:27:54 +02:00
Arthur Targaryen
d1f0740765 Refactor in operator for Range 2021-10-09 19:27:54 +02:00
Arthur Targaryen
29cbcb8459 Implement RangeIterator::contains 2021-10-09 19:27:54 +02:00
Arthur Targaryen
7f06d6144f Support in operator for record and value stream 2021-10-09 19:27:54 +02:00
Arthur Targaryen
7db6b876ab Simplify Result<Value, _> comparaison using matches! 2021-10-09 19:27:54 +02:00
Arthur Targaryen
d3bc096d47 Handle reverse ranges
This is really ugly and should be refactored.
2021-10-09 19:27:54 +02:00
Arthur Targaryen
8783cf0138 Add basic in operator support 2021-10-09 19:27:54 +02:00
JT
563a0b92b5
Merge pull request #113 from nushell/more_test
Add a couple more tests to for, add stream/list PartialEq
2021-10-10 06:03:09 +13:00
JT
8df9ea6c68 Add a couple more tests to for 2021-10-10 05:58:33 +13:00
JT
b28f876095
Merge pull request #112 from nushell/fix_for
Fix the for loop to create vars
2021-10-10 05:24:05 +13:00
JT
5d36d37d20 Merge branch 'main' into fix_for 2021-10-10 05:20:50 +13:00
JT
789fc30bf9 oops forgot file 2021-10-10 05:14:02 +13:00
JT
2c01901fcf
Merge pull request #111 from elferherrera/unit-test
Example unit test
2021-10-10 05:13:22 +13:00
JT
e4ce41ba15 Fix the for loop to create vars 2021-10-10 05:10:46 +13:00
Fernando Herrera
a1bfa2788c not found message for windows 2021-10-09 16:44:45 +01:00
Fernando Herrera
8756e88e3c command split 2021-10-09 14:28:09 +01:00
Fernando Herrera
41366f6cc4 Merge branch 'main' of https://github.com/nushell/engine-q into unit-test 2021-10-09 14:17:07 +01:00
Fernando Herrera
e3e4ae0591 example unit test 2021-10-09 14:10:10 +01:00
JT
9a3b0312d2
Merge pull request #110 from nushell/better_value_map
Add map and flat_map to value
2021-10-09 19:24:16 +13:00
JT
2cd1f634d0 Add map and flat_map to value 2021-10-09 19:20:32 +13:00
JT
ddea4b416d
Merge pull request #109 from nushell/split_column_row
Port split column and split row
2021-10-09 17:18:12 +13:00
JT
5c29a83a7a Add tests 2021-10-09 15:45:25 +13:00
JT
60f9fe1aa4 Port split column and split row 2021-10-09 15:41:39 +13:00
JT
44fbf0fce3
Merge pull request #108 from nushell/help_and_start_split
Port help and start porting split
2021-10-09 14:07:13 +13:00
JT
4ddc953e38 Port help and start porting split 2021-10-09 14:02:01 +13:00
JT
6c5a99b1a5
Merge pull request #106 from nushell/cleaner_extern
More external cleanup
2021-10-09 11:34:40 +13:00
JT
64d83142c3 More external cleanup 2021-10-09 11:30:10 +13:00
JT
b654415494
Merge pull request #105 from nushell/improve_external_args
Allow vars and subexprs in extern args
2021-10-09 10:56:24 +13:00
JT
dea9c1482b Allow vars and subexprs in extern args 2021-10-09 10:51:47 +13:00
JT
c79dca999c
Merge pull request #104 from nushell/improved_alias_expand
Improve the alias expansion
2021-10-09 08:43:54 +13:00
JT
1b977c658c Improve the alias expansion 2021-10-09 08:38:42 +13:00
Darren Schroeder
ed9fa2b4c3
Merge pull request #103 from fdncred/grid_custom_sep
allow one to specify a custom separator for the grid
2021-10-08 10:21:35 -05:00
Darren Schroeder
42113a767a allow one to specify a custom separator 2021-10-08 10:15:07 -05:00
Darren Schroeder
7f3f41ff14
Merge pull request #102 from fdncred/ls_colors_grid
respect lscolors env var; measure width minus ansi
2021-10-08 10:01:23 -05:00