JT
3176f60b5b
Merge pull request #243 from kubouch/module-files
...
Loading modules from files
2021-11-01 11:08:03 +13:00
Jakub Žádník
7112664b3f
Fix wrong spans of multiple files
...
The introduction of `use <file.nu>` added the possibility of calling
`working_set.add_file()` more than once per parse pass. Some of the
logic handling the file contents offsets prevented it from working and
hopefully, this commit fixes it.
2021-10-31 17:22:10 +02:00
JT
cf3f3fde92
Add some support for
2021-10-30 07:15:17 +13:00
JT
bac8b8a450
Add initial ctrl-c support
2021-10-28 17:13:10 +13:00
JT
c18f0dcc84
range display touchup
2021-10-26 11:24:10 +13:00
JT
85a69c0a45
WIP
2021-10-26 10:14:21 +13:00
JT
d29208dd9e
WIP
2021-10-26 09:04:23 +13:00
JT
f84582ca2b
WIP
2021-10-26 06:46:26 +13:00
JT
5d19017603
WIP
2021-10-26 05:58:58 +13:00
JT
baac60a5a7
WIP
2021-10-25 19:42:38 +13:00
JT
b5965ee8ef
WIP
2021-10-25 19:31:39 +13:00
JT
397a31e69c
WIP
2021-10-25 17:24:10 +13:00
JT
b6d269e90a
WIP
2021-10-25 17:01:02 +13:00
JT
b322a12f58
Add more helper functions
2021-10-20 18:58:25 +13:00
JT
bd5009a865
Merge pull request #235 from GabrielBG0/interactive-flag
...
cp, mv, and rm commands need to support -i flag
2021-10-16 07:17:03 +13:00
Gabriel B Gutierrez
8c2ae1eed1
-i flag finished, lacking tests
2021-10-14 14:54:51 -03:00
JT
fdd2c35fd9
Add the default help flag
2021-10-14 06:53:27 +13:00
xiuxiu62
8fee0b32e7
impl Value::Record from HashMap<String, Value>
2021-10-12 14:54:28 -07:00
JT
6024a001b4
Clarify todo/fixmes
2021-10-13 06:44:23 +13:00
JT
5f14faf4b4
Custom switch support
2021-10-12 17:49:17 +13:00
JT
96419f168b
Also fix the flag params
2021-10-12 10:17:45 +13:00
JT
63e3552eef
Add the remaining missing operators
2021-10-12 09:35:12 +13:00
JT
1a15f30eb8
Error on missing column during cell path
2021-10-12 08:51:54 +13:00
JT
38bc394a12
Expose errors early when possible
2021-10-12 07:45:31 +13:00
JT
d33a9549b5
Add serialize/deserialize for streams
2021-10-12 07:12:47 +13:00
JT
4d0a253924
Merge main
2021-10-11 14:57:39 +13:00
JT
c3a032950d
Add initial batch of into conversions
2021-10-11 14:56:19 +13:00
Justin
7cafdc9675
Merge branch 'nushell:main' into main
2021-10-10 13:15:54 -07: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
xiuxiu62
97ca242634
add rm command + stubs for open and save
2021-10-09 21:13:15 -07:00
Arthur Targaryen
a0a63c966f
Add inline attribute and address warning
2021-10-09 19:44:03 +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
8df9ea6c68
Add a couple more tests to for
2021-10-10 05:58:33 +13:00
JT
5d36d37d20
Merge branch 'main' into fix_for
2021-10-10 05:20:50 +13:00
JT
e4ce41ba15
Fix the for loop to create vars
2021-10-10 05:10:46 +13: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
2cd1f634d0
Add map and flat_map to value
2021-10-09 19:20:32 +13:00