Commit Graph

8119 Commits

Author SHA1 Message Date
349af05da8 Do not throw error for files not found in lib_dirs (#4029) 2021-09-20 13:44:47 -05:00
29771c7d23 clippy errors 2021-09-20 10:42:03 +01:00
cb0914ecb0 remove enter scope 2021-09-20 10:32:55 +01:00
JT
b3b3cf0689 Remove the docker instructions
Docker has been out of date for a long time, go ahead and remove.
2021-09-20 19:33:49 +12:00
672dd5a868 external with input 2021-09-19 22:48:33 +01:00
JT
cbe85cbeaf Merge pull request #50 from elferherrera/externals
Externals proposal
2021-09-20 09:37:12 +12:00
6731e3542d clippy errors 2021-09-19 22:05:24 +01:00
5d59234f8d Flexibility updating table's cells. (#4027)
Very often we need to work with tables (say extracted from unstructured data or some
kind of final report, timeseries, and the like).

It's inevitable we will be having columns that we can't know beforehand what their names
will be, or how many.

Also, we may end up with certain cells having values we may want to remove as we explore.

Here, `update cells` fundamentally goes over every cell in the table coming in and updates
the cell's contents with the output of the block passed. Basic example here:

```
> [

    [   ty1,       t2,       ty];

    [     1,        a, $nothing]
    [(wrap), (0..<10),      1Mb]
    [    1s,     ({}),  1000000]
    [ $true,   $false,   ([[]])]

] | update cells { describe }

───┬───────────────────────┬───────────────────────────┬──────────
 # │          ty1          │            t2             │    ty
───┼───────────────────────┼───────────────────────────┼──────────
 0 │ integer               │ string                    │ nothing
 1 │ row Column(table of ) │ range[[integer, integer)] │ filesize
 2 │ string                │ nothing                   │ integer
 3 │ boolean               │ boolean                   │ table of
───┴───────────────────────┴───────────────────────────┴──────────
```

and another one (in the examples) for cases, say we have a timeseries table generated and
we want to remove the zeros and have empty strings and save it out to something like CSV.

```
> [
    [2021-04-16, 2021-06-10, 2021-09-18, 2021-10-15, 2021-11-16, 2021-11-17, 2021-11-18];
    [        37,          0,          0,          0,         37,          0,          0]
] | update cells {|value| i
  if ($value | into int) == 0 {
    ""
  } {
    $value
  }
}

───┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────
 # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18
───┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────
 0 │         37 │            │            │            │         37 │            │
───┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────
```
2021-09-19 15:37:54 -05:00
5a6aebfcb2 clippy errors 2021-09-19 21:09:11 +01:00
96af23f370 clippy errors 2021-09-19 20:41:35 +01:00
4e6b6a8902 Merge branch 'main' of https://github.com/nushell/engine-q into externals 2021-09-19 20:30:07 +01:00
bafc50fd5c external command 2021-09-19 20:29:58 +01:00
Tw
4f7b423f36 Support completion when cursor inside an argument (#4023)
* Support completion when cursor inside an argument

Bash supports completion even when cursor is in an argument, this is very useful for some fixup after the initial completion.
Let add this feature as well.

Signed-off-by: Tw <wei.tan@intel.com>

* Add test for when cursor inside an argument

To support test this case, let's also take the position into account.

Signed-off-by: Tw <wei.tan@intel.com>
2021-09-19 17:23:05 +12:00
f7043bf690 Fix #3090: let binding in command leaks when error occurs (#4022) 2021-09-19 14:57:20 +12:00
Tw
1297499d7a add command g to switch shell quickly (#4014)
Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-17 10:39:14 +01:00
bd0baa961c add table selector for downloading web tables (#4004)
* add table selector for downloading web tables

* type-o

* updated debug mode to inspect mode
2021-09-16 09:02:30 -05:00
4ee536f044 fix: enable SIMD (#4021) 2021-09-16 20:01:42 +12:00
JT
8581bec891 bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
8bcbc8eeb3 Move nu-path tests to integration tests (#4015)
* Move nu-path tests to integration tests

To prevent circular dependency between nu-path and nu-test-support crates.

* Fmt
2021-09-16 07:11:28 +12:00
c164ef5489 Update to polars 0.16 (#4013)
* update to polars 0.16

* enabled features for polars
2021-09-16 07:10:12 +12:00
cc3653cfd9 Path commands: Put column path args behid flag; Allow path join appending without flag (#4008)
* Change path join signature

* Appending now works without flag
* Column path operation is behind a -c flag

* Move column path arg retrieval to a function

Also improves errors

* Fix path join tests

* Propagate column path changes to all path commands

* Update path command examples with columns paths

* Modernize path command examples by removing "echo"

* Improve structured path error message

* Fix typo
2021-09-15 21:03:51 +03:00
JT
c03324ec9c Update TODO.md 2021-09-16 05:08:40 +12:00
JT
7fc65067cf Temporarily remove the circular dep (#4009) 2021-09-15 09:17:31 +12:00
JT
f9ae882012 Update main.wxs (#4007)
Remove references to the old binaries
0.37.0
2021-09-15 07:45:30 +12:00
JT
1d80a68f4c bump to 0.37 (#4006) 2021-09-15 06:44:24 +12:00
1a9247b77f Merge branch 'main' of https://github.com/nushell/engine-q into externals 2021-09-14 07:19:31 +01:00
JT
22e30d5ea7 Merge pull request #49 from nushell/git_branch_completion
Very early proof-of-concept git branch completion
2021-09-14 17:09:21 +12:00
JT
b4f918b889 Very early proof-of-concept git branch completion 2021-09-14 16:59:46 +12:00
JT
7b54e5c4ab Merge pull request #48 from elferherrera/parse-error
Error check on def and alias
2021-09-14 15:03:18 +12:00
JT
c4d1c458a2 Merge pull request #47 from stormasm/test_buildstring
more block param and build string tests in concert with lists
2021-09-14 15:02:10 +12:00
fda69354db change name to command_prompt (#4003) 2021-09-14 08:02:10 +12:00
7aa1d8ac2a error check on def and alias 2021-09-13 20:59:11 +01:00
b6fdf611f6 more block param and build string tests 2021-09-13 09:32:03 -07:00
JT
c0bad7ab23 Merge pull request #46 from nushell/block_param_types
Block param types
2021-09-13 20:22:44 +12:00
JT
d7a3c7522b Fix test 2021-09-13 20:19:05 +12:00
JT
4dfde7393b Merge branch 'main' into block_param_types 2021-09-13 19:59:18 +12:00
JT
32c1f0c8d4 better it detection and block params in shapes 2021-09-13 19:54:13 +12:00
JT
eb67eab122 WIP 2021-09-13 19:31:11 +12:00
JT
d88e46d2d1 Merge pull request #45 from kubouch/left-unbounded-ranges
Allow parsing left-unbounded range (..10)
2021-09-13 05:01:07 +12:00
JT
caa6236f1f Merge pull request #44 from kubouch/float-ranges
Floating point ranges
2021-09-13 04:59:51 +12:00
JT
f459f77335 Merge pull request #40 from elferherrera/parse-error
Parse errors for def, let and alias
2021-09-13 04:58:25 +12:00
66c58217af change message 2021-09-12 16:36:16 +01:00
8f07f40f22 external call 2021-09-12 16:34:43 +01:00
e6a2e27e33 Fix failing compilation after rebase 2021-09-12 15:57:49 +03:00
8577d3ff41 Check for left-unbounded range before external cmd 2021-09-12 15:56:58 +03:00
78054a5352 Allow parsing left-unbounded range (..10)
It is implemented as a preliminary check when parsing a call and relies
on a fact that a token that successfully parses as a range is unlikely
to be a valid path or command name.
2021-09-12 15:56:58 +03:00
ce0b5bf4ab Add test for float ranges 2021-09-12 15:36:54 +03:00
9936946eb5 Fmt 2021-09-12 14:58:32 +03:00
013b12a864 Do not allow precision interval to rach < epsilon 2021-09-12 14:55:11 +03:00
2f04c172fe Add floating point support for ranges 2021-09-12 14:12:53 +03:00