Commit Graph

1649 Commits

Author SHA1 Message Date
Jae-Heon Ji
ed46f0ea17
fix: add missing metadata for ls_colors (#4603)
* feat: add metadata to roll

* chore: apply clippy

* fix: apply clippy

* fix: revert clippy
2022-02-25 17:31:02 -05:00
JT
0c3ea636fb
Add support for stderr and exit code (#4647) 2022-02-25 14:51:31 -05:00
JT
977ef66356
Fix Windows doc comments (#4643)
* WIP windows doc comments

* WIP windows doc comments

* WIP windows doc comments

* actual fix this time
2022-02-25 13:03:39 -05:00
Justin Ma
e6570b41ca
Fix some examples and regenerate docs, should fix: #4455 (#4639) 2022-02-25 08:14:15 -05:00
JT
e8a6458f0d
finish up with examples (#4637) 2022-02-25 05:19:25 -05:00
JT
70009c015d
Use metadata with lists (#4635)
* Windows external exceptions

* Also use metadata with lists
2022-02-25 04:27:50 -05:00
JT
3c62d27c28
Try again with math-like externals (#4629)
* Try again with math-like externals

* clippy 1.59

* clippy 1.59

* clippy 1.59
2022-02-24 14:02:28 -05:00
JT
308ab91aff
Speed up the parser and nuon parser a bit more (#4626) 2022-02-24 07:58:53 -05:00
Justin Ma
c3979ef1cf
Add example for command n,g,p and grid, update date now examples (#4622) 2022-02-24 06:17:05 -06:00
Michael Angerman
feb4f5c347
replace ValueStream with ListStream (#4621) 2022-02-24 06:57:31 -05:00
Fernando Herrera
21c0f7d738
allow int and float as strings for arguments (#4615)
* allow int and float as strings for arguments

* consume iterator
2022-02-24 05:09:02 +00:00
JT
4b18fdcc6e
Date literals (#4619)
* Date literals

* update deps

* Add date+duration
2022-02-23 21:02:48 -05:00
JT
676457acd3
Better ls paths (#4612)
* Fix ls paths... again

* Fix ls paths... again

* Always expand paths inside of glob_from

* Expand in ls before we check for directory info
2022-02-23 10:54:47 -05:00
Darren Schroeder
f507613b38
fixed some more tests (#4607) 2022-02-22 11:32:29 -05:00
Justin Ma
d054a724d1
Add example for enter, shells and view-source, update some docs (#4604) 2022-02-22 09:16:56 -06:00
Fernando Herrera
c2bad71123
remove repeated function (#4600)
* remove repeated function

* name in signature
2022-02-22 08:13:38 -05:00
JT
31925c3d40
Compact nuon tables (#4596) 2022-02-21 20:48:42 -05:00
JT
9888f8f298
Add pipeline redirection support (#4594)
* redirection

* Remove commented-out

* fix tests

* more fixes
2022-02-21 17:22:21 -05:00
JT
6d4784a7c1
Make 'each' implicitly filter out nothings (#4546)
* Make 'each' implicitly filter out nothings

* another example
2022-02-21 15:49:08 -05:00
JT
24fc9c657e
Add binary support to 'skip' (#4588)
* Add binary support to 'skip'

* add streaming
2022-02-21 13:23:43 -05:00
Justin Ma
53b5012f1e
feat: update: #4518, Add examples for command: use,module,export def,export env and export def-env (#4584) 2022-02-21 09:32:31 -06:00
Jae-Heon Ji
d1ec05b12b
fix: lose ls_colors in some filters commands (#4525)
* feat: add metadata to first

* feat: add metadata to last and skip

* feat: add metadata to reverse

* fix: apply clippy
2022-02-21 08:29:51 -06:00
JT
a2c4c92fce
Remove record iteration (#4582)
* Remove record iteration

* Remove test
2022-02-21 09:12:04 -05:00
Justin Ma
917886f8ad
feat: update: #4518, Add examples for command: hide, history, from yml, def-env, and table (#4581) 2022-02-21 07:52:50 -06:00
Joseph T. Lyons
4f367a59de
Strip trailing whitespace in files (#4575)
* Strip trailing whitespace in rs files

* Strip trailing whitespace in toml files

* Strip trailing whitespace in md files

* Strip trailing whitespace in nu files
2022-02-21 08:38:15 -05:00
Justin Ma
968427c4e9
feat: update: #4518, Add example for register,source,save,shuffle and from tsv (#4577) 2022-02-21 06:25:41 -06:00
JT
d454fad4dc
Improve json errors a bit (#4579)
* Improve json errors a bit

* typo
2022-02-21 07:08:09 -05:00
JT
a96f8b891e
more strict nuon handling, better nuon errors (#4576)
* more strict nuon handling, better nuon errors

* Improve errors a bit more
2022-02-20 22:31:50 -05:00
Joseph T. Lyons
5bf2ffeaf5
Add indent flag to to json (first draft) (#4571)
* Add indent flag to `to json` (first draft)

* Run cargo fmt

* Update examples / tests

* Change order of examples
2022-02-20 16:29:19 -06:00
JT
fd22211737
Add nuon format for fun (#4401)
* Add nuon format for fun

* more fun

* More nuon fixes, allow comments, improve errors
2022-02-20 16:26:41 -05:00
eggcaker
b92aaf0432
add custom header ability to post command (#4558) 2022-02-19 19:27:48 -06:00
Justin Ma
aea4355d04
refactor: change column names from 'Column*' to 'column*' (#4556) 2022-02-19 19:26:47 -05:00
Darren Schroeder
7163721571
a few more ansi escape sequences (#4553) 2022-02-19 16:47:52 -06:00
Joseph T. Lyons
efd62f917f
Reduce code duplication in to json command (#4551) 2022-02-19 14:46:20 -06:00
Justin Ma
ac99ac003a
Add example for cd,transpose,detect columns,split column and split row (#4549) 2022-02-19 09:24:48 -06:00
Justin Ma
3f14b75153
feat: add examples for length,lines,reject,benchmark and drop column (#4547) 2022-02-18 19:03:24 -06:00
JT
d53eaac7a1
Improve comparison errors (#4541) 2022-02-18 17:11:27 -05:00
Eli Flanagan
e5bf56a7dd
port post (#4537)
This restores a basic version of the `post` command.
Some source types have been omitted from this first take.
I copied from `fetch` and from `post`@0.40.0.
Part of #4356
2022-02-18 13:53:10 -05:00
JT
786e4ab971
Make 'for' implicitly filter out nothings (#4536)
* Make 'for' implicitly filter out nothings

* Fix test
2022-02-18 13:41:41 -05:00
Justin Ma
1235d516a5
Add examples for env,let-env,rm,touch and date list-timezone (#4531)
* feat: update #4518, add examples for env,let-env,rm,touch and date list-timezone

* fix typo

* update example for `date list-timezone` command
2022-02-18 18:19:37 +02:00
Justin Ma
dd11be03be
feat: update #4518, add command examples for def, do, cp, mv, mkdir and ls (#4528) 2022-02-18 08:30:16 -06:00
Justin Ma
a5f9ad2a43
Add or update examples for some commands (#4521)
* chore: add or update examples for some commands

* chore: code formatting
2022-02-18 07:06:52 -06:00
Darren Schroeder
1377693f0f
standardize char nf terms (#4520) 2022-02-18 05:52:48 -05:00
Jakub Žádník
bccce0ab46
Use overlay ID for module import lookup (#4514)
* Add id to import pattern

* Finish testing importing in a block
2022-02-17 20:58:24 -05:00
Darren Schroeder
d4cd3f9578
allow dfr open to open tsv files (#4516) 2022-02-17 14:15:17 -06:00
Genna Wingert
8f5b857fcf
Fix ignore to run side effects of previous command (#4510)
Co-authored-by: Genna Wingert <wingertge@gmail.com>
2022-02-17 12:49:54 -05:00
JT
fa75c93765
Slight cleanup of 'from json' line-at-a-time (#4512) 2022-02-17 12:49:31 -05:00
JT
393cb7ca6f
Treat ls for absolute paths as-is (#4513)
* Absolute paths in ls are treated as-in

* Better fix
2022-02-17 12:49:20 -05:00
JT
f5f9d56c37
Move to a standard kebab/snake style (#4509) 2022-02-17 09:55:17 -05:00
JT
6e733f49bc
Require block params (#4505)
* Require block params

* Improve errors
2022-02-17 06:40:24 -05:00
Darren Schroeder
b8b2737890
make find case insensitive (#4502) 2022-02-16 19:42:40 -06:00
JT
d620f76a21
Make comparisons/sort-by more 'global' (#4500)
* Make comparisons/sort-by more 'global'

* Let custom values do their own comparisons
2022-02-16 13:30:37 -06:00
Darren Schroeder
b64ac9eb7b
more test fixes (#4499)
* more test fixes

* update multi-os err messages
2022-02-16 12:24:45 -06:00
JT
5b6156687e
Use partial_cmp and make -i case insensitive (#4498)
* Use partial_cmp and make -i case insensitive

* Insensitive sort multiple columns
2022-02-16 11:12:49 -05:00
JT
c4e1559f89
Another batch of command tests (#4496)
* Add a batch of command tests

* More tests
2022-02-16 07:38:02 -05:00
JT
644435bfe3
Move and enable with-env test (#4489) 2022-02-16 04:59:44 -05:00
Michael Angerman
bd96ce4e9c
add more examples to the sys command (#4491) 2022-02-15 21:06:38 -08:00
Darren Schroeder
7e6430def0
a few more tests (#4488) 2022-02-15 20:48:32 -05:00
JT
df07e8e410
Fix view-source command (#4486) 2022-02-15 17:03:06 -05:00
Jonathan Moore
f824388f63
Date format list (#4485)
* Add `date format --list`, and make format string optional (providing default)

* Make DRY

`into datetime --list` now uses `generate_strfttime_list` from `date format --list`

* refactor strftime to use current datetime

* Fix formatting of specification descriptions

Fixes issues caused when copying directly from docs.rs

* Change default format to rfc2822

Perhaps to make it more DRY, functions from `into datetime` can be used. However, currently `into datetime` is a bit tricky to use as it needs a separate time zone argument.

* Tweak in-shell docs to match modified behavior

* Show %#z format specifier in `into datetime --list` only

* cargo fmt

* Satisfy clippy
2022-02-15 15:13:40 -06:00
Darren Schroeder
f11fa99d30
check to make sure we have data first (#4484) 2022-02-15 15:08:11 -06:00
JT
66669d7839
Fix more command tests (#4481) 2022-02-15 10:08:07 -05:00
JT
5c1a1be02b
Don't error on failed external expansion (#4480) 2022-02-15 08:47:25 -05:00
JT
9114a2d31d
Ensure that reduce has a valid span (#4479) 2022-02-15 07:59:51 -05:00
Michael Angerman
63a2c2bc2d
remove ignore for sort_by command test by_column which is now passing (#4465) 2022-02-13 20:46:12 -08:00
Michael Angerman
06f5affc0b
add in the Value List to the sort-by Ordering (#4464) 2022-02-13 10:20:50 -08:00
Michael Angerman
7a3aeaf080
sort_by: coerce_compare now returns an Ordering (#4461)
* coerce_compare now returns an Ordering which will enable mixed type comparison

* arbitrary nushell sort order of Float / Int / String / Bool
2022-02-13 09:23:54 -08:00
Justin Ma
a520599fa0
fix: fix with-env example with pipeline input (#4458) 2022-02-13 06:40:01 -06:00
Andrew Barnes
77eb4c4188
Fix default duplicates column (#4452)
* Add test to ensure default not adding dup. columns

* Fix for default adding duplicate columns
2022-02-13 05:38:46 -05:00
Michael Angerman
e82ffc4dee
sort_by error processing return ShellError instead of static String (#4453)
* sort_by error processing part I return ShellError instead of static Strings

* more explicit details on what types are failing

* clippy fixes
2022-02-12 21:30:57 -08:00
Darren Schroeder
6fc082f6e9
fix case insensitive sort (#4449)
* fix case insensitive search

* fixed test

* tweak
2022-02-12 20:48:50 -06:00
Justin Ma
560be6e73e
feat: mark str to-datetime as deprecated command (#4448) 2022-02-12 20:30:37 -06:00
Robert O'Shea
c5e7bccee5
Fixed printing of builtin kill command #4392 (#4447)
* Fixed printing of builtin kill command

* Fixed fmt and clippy issues for kill command

* Uncommented unintentional comments

* Fixed wrong code added in kill command

* Fixed more fmt issues with kill command
2022-02-12 20:18:27 -06:00
Jakub Žádník
94a0e3060a
Update CI (#4445)
* Add different features combinations

* Specify styles manually

* Fix args

* Fix typo

* Let other CI jobs finish if one fails

* Fix unused symbols without plugin feature

* Put "which" tests behind "which" feature

* Add Python virtualenv job

* Oops forgot git command

* Install Nushell in virtualenv tests

* Add names to steps; Test v.env in separate step

* cd into virtualenv

* Do not run on Python 2.7

* Build Nushell after formatting and clippy checks
2022-02-12 22:48:17 +02:00
Justin Ma
baf6348e66
feat: add unalias to deprecated command (#4440) 2022-02-12 17:06:52 +02:00
Fernando Herrera
1fd7b9ac38
roll commands (#4437)
* roll commands

* removed repeated funtion
2022-02-12 06:11:54 -05:00
Darren Schroeder
b4b7524206
changed example description (#4434) 2022-02-12 06:10:41 -05:00
Jakub Žádník
328f7e92a0
Hide alias (#4432)
* Add alias interning

Now, AliasId is used to reference aliases stored in EngineState, similar
to decls, blocks, etc.

* Fix wrong message

* Fix using decl instead of alias

* Extend also alias id visibility

* Merge also aliases from delta

* Add alias hiding code

Does not work yet but passes tests at least.

* Fix wrong alias lookup and visibility appending

* Add hide alias tests

* Fmt & Clippy

* Fix random clippy warnings in "which" command
2022-02-12 11:50:37 +02:00
Fernando Herrera
fcc13224c1
headers command (#4414)
* headers command

* correct behaviour headers
2022-02-11 21:06:49 -05:00
Robert O'Shea
926177235c
Added quiet flag rm command #4423 (#4430)
* rm now uses -f flag to not print anything

* changed quiet flag to q not f

* Changed value passed to Value::Nothing in rm command
2022-02-12 01:22:40 +02:00
Genna Wingert
85d1a681c7
Remove stringification for binary values in save command (#4428)
* Remove stringification for binary values in `save`

* Fix typo and clippy warning
2022-02-11 14:26:36 -05:00
JT
a16e485cce
Add support for defining known externals with their own custom completions (#4425)
* WIP for known externals

* Now completions can work from scripts

* Add support for definiing externs

* finish cleaning up old proof-of-concept
2022-02-11 13:38:10 -05:00
Fernando Herrera
5cf91cb30d
deprecated commands (#4405)
* deprecated commands

* deprecated insert command
2022-02-10 12:55:19 +00:00
Darren Schroeder
28947ff9a9
fix broken -w param for grid (#4397) 2022-02-10 07:29:53 -05:00
JT
c2118e7505
Fix help flag (#4398)
* Match 'help command' to 'command --help'

* Fix tests
2022-02-09 21:24:29 -05:00
Stefan Holderbach
e1f98c1bfd
Fix trash-support feature flag (#4394)
Pass it through to be inclued with `--all-features`

Make clippy without `--all-features` happy
2022-02-09 18:20:46 -05:00
Genna Wingert
12d4c2986c
Fix docs for kill command in engine-q (#4393) 2022-02-09 18:20:20 -05:00
Darren Schroeder
f275644e13
add --perf cli param (#4391)
* add `--perf` cli param

* clippy

* fixed 2 `cp` tests on windows
2022-02-09 16:08:16 -06:00
JT
fc88a8538b
Make let-env work like let (#4389)
* Make let-env work like let

* Fix tests
2022-02-09 13:41:41 -05:00
JT
5a1d81221f
Move 'nth' into 'select' (#4385) 2022-02-09 09:59:40 -05:00
JT
43850bf20e
Re-port filesystem commands (#4387)
* Re-port the filesystem commands

* Remove commented out section
2022-02-09 09:56:27 -05:00
Ray Henry
94ab981235
Fix "Index out of bounds" when input to the group-by filter is empty. #4369 (#4382)
* Fix "index out of bounds" when input to group-by is empty #4369

* Fix formatting #4369

* Adds test for empty input

Co-authored-by: Ray Henry <ray.henry@thermofisher.com>
2022-02-09 08:47:47 -06:00
JT
f9e1c4ef50
Use 'table' on scripts and -c commands (#4377)
* Use 'table' on scripts and -c commands

* Fix tests

* Oops, missed a spot
2022-02-09 05:58:54 -05:00
Stefan Holderbach
659da3c4a4
Make ANSI stripping lazy in more places (#4380)
Same rationale as in #4378

Also accelerate `grid`

before:

```
Command being timed: "./eager_nu -c for i in 0..100000 { echo whatever } | grid"
        User time (seconds): 0.21
        System time (seconds): 0.05
        Percent of CPU this job got: 36%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.71
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 48112
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 10580
        Voluntary context switches: 266
        Involuntary context switches: 2595
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```

after:

```
Command being timed: "./lazy_nu -c for i in 0..100000 { echo whatever } | grid"
        User time (seconds): 0.14
        System time (seconds): 0.05
        Percent of CPU this job got: 33%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.60
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 48272
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 1
        Minor (reclaiming a frame) page faults: 10582
        Voluntary context switches: 286
        Involuntary context switches: 831
        Swaps: 0
        File system inputs: 56
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```
2022-02-08 18:25:31 -06:00
panicbit
cf20eed7bc
Support records in reject command (#4373)
* support records in reject command

* add reject command tests
2022-02-08 15:57:46 -05:00
Darren Schroeder
baceb54660
update ls_colors defaults (#4371) 2022-02-08 11:13:04 -06:00
JT
19caef260d
Fix 'enter' to expand path before checking for it (#4370) 2022-02-08 11:21:17 -05:00
JT
d70d91e559 Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
Fernando Herrera
fdce6c49ab engine-q merge 2022-02-07 19:11:34 +00:00
Onur Şahin
265ee1281d
Drop with iter range (#4242)
* Allow range in 'drop nth'

* Unit tests for drop nth range

* Add range case to the description

* Fix description 2

* format fixes

* Fix example and some refactoring

* clippy fixes
2022-02-07 08:02:35 -05:00
JT
a78c82d811
Make PipelineData helpers collect rawstreams (#969) 2022-02-07 07:44:18 -05:00
JT
84d3620d9b
Oops, match semantics of each group/window (#967) 2022-02-06 21:26:01 -05:00
JT
8a373dd554
Add each window (#966) 2022-02-06 20:23:18 -05:00
JT
c3e0e8eb5c
Add par-each group (#965) 2022-02-06 19:28:09 -05:00
JT
a911b21256
Switch more commands to redirecting blocks (#956) 2022-02-05 21:03:06 -05:00
Darren Schroeder
2dd32c2b88
Rename some files (#952)
* renamed some files

* clippy

* update tests
2022-02-05 12:35:02 -05:00
JT
3eba90232a
Port each group (#953) 2022-02-05 12:34:35 -05:00
JT
c4858fb202
Remove broken error make examples (#951) 2022-02-05 12:01:08 -05:00
JT
8a93548de2
Error make (#948)
* Add `error make` and improve `metadata`

* Allow metadata to work on just a pipeline
2022-02-05 09:39:51 -05:00
Michael Angerman
e45e8109aa
fix test math/avg.rs can_average_bytes (#946) 2022-02-05 07:01:10 -05:00
Darren Schroeder
709927cee4
Sort keystuff (#945)
* sort things

* reorg
2022-02-04 17:20:54 -06:00
Fernando Herrera
abaeffab91
default keybindings command (#943) 2022-02-04 17:20:40 -06:00
Michael Angerman
73dcec8ea1
fix some of the sort_by tests several more left to do (#942) 2022-02-04 13:51:49 -08:00
Darren Schroeder
b26acf97bd
a few more tests (#941) 2022-02-04 15:42:18 -06:00
JT
f29dbeddd7
Allow let-env to be dynamic (#940) 2022-02-04 16:19:13 -05:00
Darren Schroeder
8204cc4f28
fix ls and ls tests (#931)
* fix `ls` and ls tests

* tweak to ls so it doesn't scream on empty dirs

* clippy

* reworked `ls` to put in what was left out
2022-02-04 14:32:13 -06:00
Michael Angerman
c2f6dfa75c
add nth tests to mod.rs (#934) 2022-02-04 12:08:25 -08:00
JT
90f6b6aedf
Simplify describe (#933) 2022-02-04 14:51:36 -05:00
Darren Schroeder
ece1e43238
fix into filesize tests and filesize (#932)
* fix into filesize tests and filesize

* tweaks

* added span back for like the 10th time

* Update filesize.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-02-04 13:26:08 -06:00
Darren Schroeder
dd2d601471
fix lines tests (#930) 2022-02-04 11:34:01 -06:00
Darren Schroeder
c6dad0d5eb
fix find tests (#928) 2022-02-04 10:47:24 -06:00
Darren Schroeder
b86c6db400
fix cal tests (#925)
* fix 1 test

* missed 1 test
2022-02-04 07:24:36 -06:00
Fernando Herrera
1e86af2fb9
list keybinding options (#906)
* list keybinding optins

* list keybinding options

* clippy error
2022-02-04 06:47:18 +00:00
JT
a008f1aa80
Command tests (#922)
* WIP command tests

* Finish marking todo tests

* update

* update

* Windows cd test ignoring
2022-02-03 21:01:45 -05:00
Darren Schroeder
3d3298290a
add case-insensitive sorting (#919) 2022-02-03 15:18:18 -06:00
Darren Schroeder
e1c28cf06b
add --du to ls command (#917) 2022-02-03 13:58:32 -06:00
Darren Schroeder
2f0bbf5adb
du command (#916)
* wip on `du` command

* working
2022-02-03 11:35:06 -06:00
JT
cc1b784e3d
Add initial nu-test-support port (#913)
* Add initial nu-test-support port

* finish changing binary name

* Oops, these aren't Windows-safe tests
2022-02-02 15:59:01 -05:00
Darren Schroeder
cbdc0e2010
Windows ps update (#909)
* query command with json, web, xml

* query xml now working

* clippy

* comment out web tests

* Initial work on query web

For now we can query everything except tables

* Support for querying tables

Now we can query multiple tables just like before, now the only thing
missing is the test coverage

* Revert "Query plugin"

* augment `ps -l` on windows to display more info

Co-authored-by: Luccas Mateus de Medeiros Gomes <luccasmmg@gmail.com>
2022-02-01 15:05:26 -06:00
Darren Schroeder
c80a15cdfe
should be inclusive (#904)
* should be inclusive

* changed tests due to spans being different
2022-01-31 17:02:36 -06:00
JT
4c9df9c7c1
Add a fallback if Windows external spawn fails (#902)
* Add a fallback if Windows external spawn fails

* Remove path workaround

* More fixes

* More fixes

* Be more flexible with error tests
2022-01-31 12:42:12 -05:00
Ashish Thapa
b1aa8f4edf
Add strftime cheatsheet for into datetime (#869) (#883)
* Add strftime cheatsheet for `into datetime` (#869)

* proper table for strftime cheatsheet of `into datetime` (#883)
2022-01-31 07:32:35 -06:00
JT
d62716c83e
Use 'table' during internal->external (#898)
* Use 'table' during internal->external

* Preserve more of config
2022-01-31 07:52:05 -05:00
Andrés N. Robalino
def5869c1c
command(split-by) (#897) 2022-01-30 18:29:21 -05:00
Jakub Žádník
2fbd182993
Allow viewing the source code of blocks (#894)
* Add spans to blocks and view command

* Better description; Cleanup

* Rename "view" command to "view-source"
2022-01-31 00:05:25 +02:00
Julian Aichholz
67cb720f24
Port update cells command (#891)
* Port update cells command

Clean up, nicer match statements in UpdateCellsIterator

Return columns flag into HashSet errors

Add FIXME: for update cell behavior on nested lists

* Fix: process cells for Record when no columns are specified

* Fix: address clippy lints for unwrap and into_iter

* Fix: don't step into lists and don't bind $it var
2022-01-30 23:41:05 +02:00
JT
a51d45b99d
Ignore clippy's erroneous warnings (#895) 2022-01-30 16:12:41 -05:00
JT
060a4b3f48
Port detect columns (#892) 2022-01-30 07:52:24 -05:00
Michael Angerman
95a5e9229a
add help --find to help doc (#890) 2022-01-30 05:54:15 -05:00
Stefan Stanciulescu
3c8716873e
Port rotate (#880)
* Add rotate command

* Add rotate counter clockwise

* Fix comments in the code

* Fix clippy warnings

* Fix comment

* Fix wrong step for non even table sizes

* Fix comment for moving through array

* Refactor rotate and have only one command with a --ccw flag for counter-clockwise rotation. By default, rotate is clockwise

* Update usage description
2022-01-29 15:47:28 -05:00
JT
44821d9941
Add support for def-env and export def-env (#887) 2022-01-29 15:45:46 -05:00
Stefan Stanciulescu
1a25970645
Port rename (#877)
* Port rename

* Update description

* Fix fmt issues

* Refactor the code a bit and move things around
2022-01-29 05:26:47 -05:00
JT
e91d8655c6
Only trim prompt (#876)
* Only trim the output for prompts

* Only remove the last newline
2022-01-28 18:22:09 -05:00
JT
4c029d2545
Automatically trim ends of stdin/stdout strings (#874) 2022-01-28 16:59:00 -05:00
JT
86eeb4a5e7
Fix a bad slice into erroring utf-8 buffer (#872) 2022-01-28 15:32:46 -05:00
JT
020ad24b25
"maybe text codec" version 2 (#871)
* Add a RawStream that can be binary or string

* Finish up updating the into's
2022-01-28 13:32:33 -05:00
eggcaker
9926561dd7
Fix into datetime example parameter type (#862) 2022-01-28 00:06:07 +11:00
Michael Angerman
a4421434d9
add support for Floats for sort-by (#857) 2022-01-26 14:44:37 -08:00
Stefan Stanciulescu
e8b8836977
Add suport for Filesize and Date for sort-by command (#855) 2022-01-26 13:54:31 -08:00
JT
78b5da8255
Allow let/let-env to see custom command input (#854) 2022-01-27 06:00:25 +11:00
JT
8ee619954d
Start support for commandline args to nu itself (#851)
* cmdline args wip

* WIP

* redirect working

* Add help and examples

* Only show flags in signature of more than help
2022-01-27 01:42:39 +11:00
JT
cdc8e67d61
Remove unused repo parts (#4271)
* Remove unused repo parts

* Update README

* cargo fmt
2022-01-26 07:31:04 +11:00
JT
285f65ba34
Port exec command (#849)
* Port exec command

* fix windows

* lint
2022-01-26 04:27:35 +11:00
JT
3023af66fd
Port default command (#848) 2022-01-26 02:02:15 +11:00
JT
1ca3e03578
Fix expanding external args (#847) 2022-01-26 00:11:35 +11:00
Stefan Stanciulescu
f4c0538653
Flatten records. Not thoroughly tested though (#845) 2022-01-25 23:07:37 +11:00
eggcaker
5c749fcc63
allow fetch command to add custom headers (#840) 2022-01-25 13:19:29 +11:00
JT
988a873466
Allow open to read its filename from input (#841)
* Allow `open` to read its filename from input

* Add examples
2022-01-25 08:04:28 +11:00
Jakub Žádník
53f41c1985
Port move (#833)
* Remove comment

* Fix merge not retaining LS_COLORS

* Add move command

* Add checking for non-existent columns

* Add move command examples; Disallow flag shorthand
2022-01-24 21:43:38 +02:00
JT
62e9698b11
Allow external args to expand globs (#839)
* Allow external args to expand globs

* WIP

* A bit of cleanups and refactor to glob_from

* oops, add file
2022-01-25 05:26:56 +11:00
JT
3d0b1ef1ce
Highlight help tutor (#838)
* WIP

* Syntax highlight help, add tutor
2022-01-25 02:05:19 +11:00
Michael Angerman
8a1b2d0812
fix several cases where sort-by was crashing engine-q (#836) 2022-01-23 20:52:19 -08:00
Darren Schroeder
d4fb95a98c
allow find to respect ls_colors (#834) 2022-01-24 12:23:03 +11:00
Arthur Targaryen
f82e2fbac6
Port find command (#658)
* Add `Find` command

* Complete rustdoc for test `Value` constructors

* Use `Option::unwrap_or` instead of match

* Add `Value::test_filesize` constructor

* Handle searching for terms in `find`

* Fix `find` command signature

* Return multiple elements when `find`ing by predicate

* Do not accept rest parameter with predicate

* Handle `CellPath` in `r#in` and `not_in` for `Find`

* Use `PipelineData::filter`
2022-01-23 16:32:02 -06:00
Darren Schroeder
e11a030780
capture keyboard event (#832)
* capture keyboard event

* try a different strategy - still not working right

* fixed up
2022-01-23 16:09:39 -06:00
Stefan Stanciulescu
4e171203cc
Fix cd-ing into a file (#831)
* Add custom error for path not being a directory

* Fix cd issue with cd-ing into a file

* Keep formatting style as before

* Check if path is not a directory and return error if that's the case
2022-01-23 15:02:12 +02:00
Darren Schroeder
3d40e169ce
fix to retain ls_colors coloring from ls (#824)
fixes #823
2022-01-22 18:36:27 -05:00
JT
bf9340ec48
Only escape backslash on windows (#825) 2022-01-22 18:35:52 -05:00
Michael Angerman
89d852f76c
port sort_by without float (yet) (#814) 2022-01-22 12:49:50 -08:00
Darren Schroeder
6a446f708d
add hash base64 (#813) 2022-01-22 10:23:55 -06:00
Stefan Stanciulescu
afe83104c6
Fix flatten's dropping column issue #756 (#805)
* Fix flatten's dropping column issue, and do some cleanup - better variable naming.

* Fix failing test

* Fix failing tests
2022-01-23 01:19:40 +11:00
JT
b58aad5eb0
Make external app error uniform (#812) 2022-01-23 01:12:34 +11:00
Jakub Žádník
564c2dd7d1
Port merge command from Nushell (#808)
* Add example test to zip

* Port merge command from Nushell

On top of the original merge, this one should not collect a stream
returned from the merged block and allows merging records.
2022-01-22 01:50:26 +02:00
Eli Flanagan
e1272f3b73
lint: remove trailing whitespace (#806) 2022-01-22 10:29:10 +11:00
JT
6fa022b0a8 Add group-by and transpose (aka pivot) (#803) 2022-01-21 15:28:21 -05:00
Darren Schroeder
057bfff0cb
add term size command (#792)
* add `term-size` command

* Update term_size.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-01-21 14:31:33 +11:00
JT
91883bd572
Better help search (#789) 2022-01-20 18:58:58 -05:00
JT
b4e61a056c
add cd - support (#787) 2022-01-21 07:51:44 +11:00
JT
33ffb2c39a
Add which command, add external completions, and builtin var completions (#782)
* Add which and external completions

* WIP

* Finish up external and var completions

* fix windows
2022-01-21 05:02:53 +11:00
Michael Angerman
d4b6b4b09a
update all cargo crates to edition 2021 (#781) 2022-01-21 00:13:45 +11:00
Fernando Herrera
6514a30b5d
general keybindings (#775)
* general keybindings

* get value function

* check error for keybinding

* cmd and send for keybingins

* better error message
2022-01-19 07:28:08 -06:00
JT
49e8af8ea5
Bump to 0.43 (#4264) 2022-01-18 12:06:12 -05:00
JT
d5d61d14b3
Tutor eq (#4263)
* Fix clippy lints

* Fix clippy lints

* Fix clippy lints

* Add e-q tutor page
2022-01-19 03:22:23 +11:00
JT
f562a4526c
Fix clippy lints (#4262)
* Fix clippy lints

* Fix clippy lints

* Fix clippy lints
2022-01-18 23:33:28 +11:00
Guillaume Gomez
e6c09f2dfc
Update sysinfo version (#4261) 2022-01-18 22:37:52 +11:00
Darren Schroeder
085a7c18cb
fix signature (#765) 2022-01-17 09:14:33 -06:00
JT
0f85646d8e
Let 'to toml' output block source (#763) 2022-01-17 19:25:12 +11:00
Darren Schroeder
c55b6c5ed5
fix list formatting (#762) 2022-01-16 16:40:40 -06:00
JT
283a615ecc
Enter now requires a directory (#761) 2022-01-17 03:14:34 +11:00
JT
9b128b7a03
Add rest to get, bump reedline (#760) 2022-01-17 02:40:11 +11:00
Jakub Žádník
bfe3c50dce
Fix empty entry in ls (#759) 2022-01-17 02:40:00 +11:00
Jakub Žádník
3b4baa31b6
Fix ls relative path & command argument path expansion (#757)
* Switch to short-names when the path is a relative_path (a dir) and exit with an error if the path does not exist

* Remove debugging print line

* Show relative filenames... It does not work yet for ls ../

* Try something else to fix relative paths... it works, but the ../ code part is not very pretty

* Add canonicalize check and remove code clones

* Fix the canonicalize_with issue pointed out by kubouch. Not sure the prefix_str is what kubouch suggested

* Fix the canonicalize_with issue pointed out by kubouch. Not sure the prefix_str is what kubouch suggested

* Add single-dot expansion to nu-path

* Move value path expansion from parser to eval

Fixes #745

* Remove single dot expansion from parser

It is not necessary since it will get expanded anyway in the eval.

* Fix ls to display globs with relative paths

* Use pathdiff crate to get relative paths for ls

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2022-01-17 00:55:56 +11:00
nibon7
746641edae
Port seq command (#755)
Signed-off-by: nibon7 <nibon7@163.com>
2022-01-17 00:52:41 +11:00
JT
fa5aab8170
Add simple stdin input command (#754)
* Add simple stdin input command

* Add binary input

* Tweak binary view
2022-01-16 15:28:28 +11:00
JT
b78924c777
Add support for load-env (#752) 2022-01-15 18:50:11 -05:00
JT
75db4a75bc
Save (#750)
* Add support for save

* Add support for binary filetypes
2022-01-16 07:44:20 +11:00
JT
8f4ee14d85
Hide Windows ps status, bump reedline (#749) 2022-01-16 06:44:24 +11:00
Jakub Žádník
21a7278259
Revert "Fix ls relative path and erroring on fake dir (#697)" (#744)
This reverts commit bee5ba3deb.
2022-01-15 12:58:24 +02:00
Stefan Stanciulescu
bee5ba3deb
Fix ls relative path and erroring on fake dir (#697)
* Switch to short-names when the path is a relative_path (a dir) and exit with an error if the path does not exist

* Remove debugging print line

* Show relative filenames... It does not work yet for ls ../

* Try something else to fix relative paths... it works, but the ../ code part is not very pretty

* Add canonicalize check and remove code clones

* Fix the canonicalize_with issue pointed out by kubouch. Not sure the prefix_str is what kubouch suggested

* Fix the canonicalize_with issue pointed out by kubouch. Not sure the prefix_str is what kubouch suggested
2022-01-15 12:30:39 +02:00
Darren Schroeder
a7241f9899
add seq_date command (#743)
* add `seq_date` command

* fixed a reedline type-o

* copy-n-paste error
2022-01-14 16:07:28 -06:00
Jakub Žádník
40484966c3
Make env var eval order during "use" deterministic (#742)
* Make env var eval order during "use" deterministic

Fixes #726.

* Merge delta after getting config

To make sure env vars are all in the engine state and not in the stack.
2022-01-15 08:06:32 +11:00
JT
ca215c1152
Add nu-system and rewrite ps command (#734)
* Add nu-system and rewrite ps command

* Add more deps

* Add more deps

* clippy

* clippy

* clippy

* clippy

* clippy

* clippy
2022-01-14 17:20:53 +11:00
JT
bc1e1aa944
Clippy fixes for Rust 1.58 (#733)
* Clippy fixes for Rust 1.58

* Try different message
2022-01-14 06:40:25 +11:00
JT
82d90f4930
Add support for var/string interp for external names (#729) 2022-01-13 19:17:45 +11:00
JT
186da4d725
Fixing captures (#723)
* WIP fixing captures

* small fix

* WIP

* Rewrite to proof-of-concept better parse_def

* Add missing file

* Finish capture refactor

* Fix tests

* Add more tests
2022-01-12 15:06:56 +11:00
Michael Angerman
160339bd1f
add in a new select test that exercises a different match arm of the select command (#718) 2022-01-10 13:29:52 -08:00
Jakub Žádník
733b2836f1
Cleanup parsing of use and hide commands (#705) 2022-01-10 12:39:25 +11:00
Darren Schroeder
3a17b60862
new command fmt to format numbers (#707)
* new command `fmt` to format numbers

* remove comments
2022-01-09 19:19:41 -06:00
Darren Schroeder
b49885bb85
Revert "added a better default for ls_colors (#703)" (#711)
This reverts commit d63eac69e5.
2022-01-09 16:48:29 -06:00
Michel Alexandre Salim
476d543dee
Update descriptions for crates split out from nu-cli (#4247)
`nu-command` and `nu-data` were split out, but the descriptions still
say 'CLI'.

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2022-01-09 06:05:50 -06:00
Darren Schroeder
d63eac69e5
added a better default for ls_colors (#703) 2022-01-08 08:30:48 -06:00
Darren Schroeder
38e0527083
add more chars (#701)
* add more chars

* group nerdfonts with nf- prefix

* labeled unicode weather symbols
2022-01-08 07:19:51 -06:00
Jakub Žádník
3b467bedd9
Add reduce command (#700)
* Add reduce command

* Fix example and missing test commands

* Add forgotten file
2022-01-08 02:40:40 +02:00
Jakub Žádník
eab6b322bb
Add CR, LF and CRLF to char command (#691) 2022-01-06 20:52:43 +02:00
Ștefan
47544ad219
Move fetch to extra and clean up some code (#664)
* Move fetch to extra

* Move byte stream code to a function instead of copying it twice

* Fix formatting issues

* Make fetch a default command

* Fix formatting
2022-01-06 10:06:16 +11:00
Jakub Žádník
d0c280f6cc
Fixes how environment is cloned inside tight loops (#678)
* Improve cd IO error

* Fix environment cloning in loops

* Remove debug print

* Fmt
2022-01-06 09:21:26 +11:00
JT
14cd798f00
Make ls more forgiving (#681) 2022-01-06 09:21:15 +11:00
JT
3c2a336ef9
Each much clone its env (#675) 2022-01-05 23:08:03 +11:00
JT
058738c48c
More shell fixes (#673) 2022-01-05 17:36:42 +11:00
JT
affb9696c7
Fix directory change lag (#672) 2022-01-05 16:50:27 +11:00
JT
c158d29577
Add shells support (#671) 2022-01-05 15:35:50 +11:00
JT
b4c72e85e1
Limit when we expand external args (#668) 2022-01-05 12:09:53 +11:00
JT
41dbc641cc
Some cleanups for cd/PWD (#667)
* Some cleanups for cd/PWD

* Some cleanups for cd/PWD
2022-01-05 11:26:01 +11:00
Jakub Žádník
74dcd91cc3
Use only $nu.env.PWD for getting the current directory (#587)
* Use only $nu.env.PWD for getting current directory

Because setting and reading to/from std::env changes the global state
shich is problematic if we call `cd` from multiple threads (e.g., in a
`par-each` block).

With this change, when engine-q starts, it will either inherit existing
PWD env var, or create a new one from `std::env::current_dir()`.
Otherwise, everything that needs the current directory will get it from
`$nu.env.PWD`. Each spawned external command will get its current
directory per-process which should be thread-safe.

One thing left to do is to patch nu-path for this as well since it uses
`std::env::current_dir()` in its expansions.

* Rename nu-path functions

*_with is not *_relative which should be more descriptive and frees
"with" for use in a followup commit.

* Clone stack every each iter; Fix some commands

Cloning the stack each iteration of `each` makes sure we're not reusing
PWD between iterations.

Some fixes in commands to make them use the new PWD.

* Post-rebase cleanup, fmt, clippy

* Change back _relative to _with in nu-path funcs

Didn't use the idea I had for the new "_with".

* Remove leftover current_dir from rebase

* Add cwd sync at merge_delta()

This makes sure the parser and completer always have up-to-date cwd.

* Always pass absolute path to glob in ls

* Do not allow PWD a relative path; Allow recovery

Makes it possible to recover PWD by proceeding with the REPL cycle.

* Clone stack in each also for byte/string stream

* (WIP) Start moving env variables to engine state

* (WIP) Move env vars to engine state (ugly)

Quick and dirty code.

* (WIP) Remove unused mut and args; Fmt

* (WIP) Fix dataframe tests

* (WIP) Fix missing args after rebase

* (WIP) Clone only env vars, not the whole stack

* (WIP) Add env var clone to `for` loop as well

* Minor edits

* Refactor merge_delta() to include stack merging.

Less error-prone than doing it manually.

* Clone env for each `update` command iteration

* Mark env var hidden only when found in eng. state

* Fix clippt warnings

* Add TODO about env var reading

* Do not clone empty environment in loops

* Remove extra cwd collection

* Split current_dir() into str and path; Fix autocd

* Make completions respect PWD env var
2022-01-05 09:30:34 +11:00
JT
8f6843c600
Move $nu.env to $env (#665)
* Move env from nu builtin to its own

* update samples/tests
2022-01-05 08:34:42 +11:00
JT
857ecda050
Let describe know about binary (#662) 2022-01-04 14:05:24 +11:00
JT
36079f1a3d
Port fetch (with fixes) (#660)
* Port fetch to engine-q

* Fix check for path as a string

* Add a timeout flag and fix some span issues

* Add a temporary fetch command that returns byte streams. Got rid of async stuff as we're using the blocking feature of tokio

* More tweaks for the bytestream

* Rewrite fetch using ByteStreams

* buffer read on bytes directly

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2022-01-04 13:01:18 +11:00
JT
850f66aa9d
Fix build breakage - bump ansi term (#651)
* Fix build breakage - bump ansi term

* Remove e-q ansi term
2022-01-03 09:36:32 +11:00
JT
f7e3d4de24
Add fuzzy/ignore flag to get (#641) 2022-01-02 13:18:39 +11:00
Michael Angerman
5d58f68c59
port over from nushell the column flag for the length command (#617)
* port over from nushell the column flag for the length command

* fix clippy error

* refactor with the get_columns now centrally located
2022-01-01 15:27:20 +11:00
Michael Angerman
f734995170
move get_columns from the table_viewer to a central location (#628)
* get_columns is working in the columns command

* the new location of the get_columns method is nu-protocol/src/column.rs

* reference the new location of the get_columns method

* move get_columns to nu-engine
2021-12-31 17:39:58 -08:00
Darren Schroeder
18ddcdcb97
type-o in signature (#633) 2021-12-31 09:54:30 -06:00
Tom Panton
822309be8e
Port the every command (#626) 2021-12-31 10:41:18 +11:00
Justin
56ae07adb9
Ported ignore command to engine-q (#621)
* Ported `ignore` command to engine-q

* Format ignore command
2021-12-30 15:54:33 +11:00
Darren Schroeder
7faa4fbff4
revert file_types to lowercase (#623)
* revert file_types to lowercase

* fix test
2021-12-29 21:16:50 -06:00
JT
832a801c11
Preserve metatdata in where (#618) 2021-12-29 22:17:20 +11:00
JT
62011b6bcc
Bump to 0.42 (#4234) 2021-12-28 20:56:59 +11:00
Darren Schroeder
1837acfc70
add ability to specify an ansi style (#595)
* add ability to specify an ansi style

* remove comments

* remove more debug code

* some cleanup and refactoring
2021-12-27 08:59:55 -06:00
JT
3706bef0a1
Require let to be a statement (#594) 2021-12-27 14:04:22 +11:00
JT
de30236f38
Fix ls listing (#593) 2021-12-27 12:46:32 +11:00
JT
e1c92e90ca
Add line ending autodetect to 'lines' (#589) 2021-12-27 10:11:18 +11:00
Stefan Holderbach
39f03bf5e4
Decode escaped newlines in history command (#592)
Reedline currently encodes newlines as `<\n>`
2021-12-27 10:11:08 +11:00
JT
89a000a572
Fix some 'open' signature stuff (#583) 2021-12-26 09:13:43 +11:00
JT
a811eee6b8
Add support for 'open' (#573) 2021-12-25 06:24:55 +11:00
JT
1efae6876d
Wire hex viewing into a few more places (#572) 2021-12-25 05:15:01 +11:00
JT
3522bead97
Add string stream and binary stream, add text decoding (#570)
* WIP

* Add binary/string streams and text decoding

* Make string collection fallible

* Oops, forgot pretty hex

* Oops, forgot pretty hex

* clippy
2021-12-24 18:22:11 +11:00
JT
7f0921a14b
Add metadata command (#569)
* Add metadata command

* Add string interpolation to testing
2021-12-24 11:16:50 +11:00
JT
b719f8d4eb
Add missing flags to existing commands (#565)
* Add missing flags to existing commands

* fmt
2021-12-24 08:41:29 +11:00
Matthew Auld
c33104c4ae
Ported compact command to engine-q (#558)
* :Interm work porting compact to engine-q

* Port 'compact' command from nushell to engine-q

* Fixed example
2021-12-23 14:08:39 +11:00
Michael Angerman
5d3b63fa90
add in a raw flag in the command to json (#555)
* add in the method to_string_raw

* add in a raw flag to json

* add in a test
2021-12-23 06:56:49 +11:00
nibon7
6cd124ddb2
allow insecure server connections when using SSL (#4219)
Fixes #4211

Signed-off-by: nibon7 <nibon7@163.com>
2021-12-23 06:48:43 +11:00
JT
0c920f7d05
Add history command (#553) 2021-12-22 22:19:38 +11:00
Jakub Žádník
8ba3e3570c
Interpret lists as series of args for externals (#550)
* Interpret lists as series of args for externals

* Fix clippy warnings
2021-12-22 10:13:05 +02:00
Fernando Herrera
ea6912c3f7
missing commands (#549) 2021-12-22 10:35:02 +11:00
Jakub Žádník
deeb1da359
Allow having only one env conversion (#548)
Allows setting only `from_string` or `to_string` in `env_conversions`
config. Previously, both were required.
2021-12-22 00:32:38 +02:00
Ștefan
a93a9b9029
Add skip-empty flag to lines command (#543)
* Add skip-empty flag to lines command

* Fix failing length test
2021-12-22 07:24:11 +11:00
Fernando Herrera
6a35e6b7b6
Dataframe commands (#542)
* groupby object

* aggregate command

* eager commands

* rest of dataframe commands
2021-12-22 05:32:09 +11:00
JT
c3a16902fe
Fix list printing (#540) 2021-12-21 20:05:16 +11:00
JT
fc7ed1bfe4
switch substring to bytes (#538)
* switch substring to bytes

* Add a test
2021-12-21 11:49:02 +11:00
Jakub Žádník
1609101e62
Fix capturing environment variables with " or ' (#537)
* Fix path expand error span

* Fix capturing env vars containing ' or "; Rustfmt
2021-12-20 23:19:43 +02:00
JT
0571a6ee34
Merged heterogeneous tables (#536)
* Merged heterogeneous tables

* switch emoji
2021-12-21 08:03:47 +11:00
JT
152467a858
Flatten should flatten embedded table (#534) 2021-12-21 06:03:18 +11:00
Jae-Heon Ji
ff5b7e5ad2
feat(into): add into-bool command (#499)
* feat(into): add example of into-bool

* feat(into): add convert from int and float

* feat(into): add converting string to bool

* feat(into): add converting value in table

* fix(into): update error

* fix(into): update span for example

* chore(into): update signature description

* float comparison using epsilon

* Update bool.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2021-12-20 07:11:28 +11:00
Ștefan
c37bdcd119
port empty command (#528)
* port empty command

* Pull upstream and use test_data() function for example tests
2021-12-20 06:11:57 +11:00
Fernando Herrera
038ad951da
name change (#526) 2021-12-19 10:00:31 +00:00
JT
2883d6cd1e
Remove Span::unknown (#525) 2021-12-19 18:46:13 +11:00
Michael Angerman
00bb203756
add in a new command called columns (#519) 2021-12-18 12:14:28 -06:00
Fernando Herrera
8933dde324
Plugin option for shell (#517)
* calling plugin without shell

* spelling error

* option on register to select a shell
2021-12-18 12:13:56 -06:00
Darren Schroeder
b3b328d19d
add lp and rp (#518) 2021-12-18 12:13:10 -06:00
Fernando Herrera
46b86f3541
Migration of series commands (#515)
* corrected missing shellerror type

* batch dataframe commands

* removed option to find declaration with input

* ordered dataframe folders

* dataframe command name
* series commands

* date commands

* series commands

* series commands

* clippy correction

* rename commands
2021-12-18 17:45:09 +00:00
Ștefan
6f6340186a
Port flatten (#512)
* A first working version of flatten. Needs a lot of cleanup. Committing to have a working version

* Typo fix

* Flatten tests pass

* Final cleanup, ready for push

* Final cleanup, ready for push

* Final cleanup, ready for push

* Final cleanup, ready for push

* Update flatten.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2021-12-18 07:44:51 +11:00
Matthew Auld
6ba1e6172c
Port 'ansi strip' command from nushell to engine-q (#511)
* Port 'ansi strip' command from nushell to engine-q

* added example
2021-12-18 07:32:03 +11:00
Matthew Auld
438c2df8b6
Porting 'ansi gradient' command from nushell to engine-q (#509)
* Porting  'ansi gradient' command from nushell to engine-q

* passed correct span variable
2021-12-18 04:40:47 +11:00
Jakub Žádník
6a0f404558
Treating environment variables as Values (#497)
* Proof of concept treating env vars as Values

* Refactor env var collection and method name

* Remove unnecessary pub

* Move env translations into a new file

* Fix LS_COLORS to support any Value

* Fix spans during env var translation

* Add span to env var in cd

* Improve error diagnostics

* Fix non-string env vars failing string conversion

* Make PROMPT_COMMAND a Block instead of String

* Record host env vars to a fake file

This will give spans to env vars that would otherwise be without one.
Makes errors less confusing.

* Add 'env' command to list env vars

It will list also their values translated to strings

* Sort env command by name; Add env var type

* Remove obsolete test
2021-12-17 12:04:54 +11:00
Arthur Targaryen
342584e5f8
Port keep, keep while and keep until commands (#384)
* Add `KeepUntil` sub-command

* Add `KeepWhile` sub-command

* Add `Keep` command

* Fix error type
2021-12-17 11:57:02 +11:00
Matthew Auld
a148ad8697
added a 'list' option to the ansi command (#504) 2021-12-16 12:36:07 -06:00
Darren Schroeder
9a864b5017
allow flatshape (command line syntax) theming (#502)
* allow flatshape (command line syntax) theming

* renamed crate, organized
2021-12-16 06:17:29 -06:00
JT
17a7a85c78
Bump some deps (#503) 2021-12-16 20:40:05 +11:00
Matthew Auld
89e2169521
Porting 'char' command from nushell to engine-q (#500)
* Port 'char' command from nushell to engine-q

* fixed unit tests

* Actually fixed unit tests
2021-12-16 10:08:12 +11:00
Matthew Auld
e289630920
Porting 'ansi' command from nushell to engine-q (#494)
* Porting 'ansi' command from nushell to engine-q

* Added StrCollect to example_test.rs to allow example tests to run

* Run 'cargo fmt' to fix formatting

* Update command.rs

* Update command.rs

* Update command.rs

* Added a category

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2021-12-16 10:06:35 +11:00
Michael Angerman
0450cc25e0
port over from nushell drop nth (#498) 2021-12-15 06:26:15 -06:00
Michael Angerman
1cbb785969
port over from nushell drop column (#495)
* port over from nushell drop column

* fix clippy
2021-12-15 06:54:27 +11:00
Benoît Cortier
a41ae72bc1
Fix error propagration across hash commands (#493) 2021-12-15 06:49:48 +11:00
Darren Schroeder
a5c1dd0da5
allow fg, bg, attributes to be set for all colors in color_config (#489)
* allow fg, bg, attributes to be set for all colors in color_config

* no need for comma between each key value
2021-12-14 13:34:39 -06:00
Eli Flanagan
e919f9a73b
use heck for string casing (#4081)
I removed the Inflector dependency in favor of heck for two reasons:
- to close #3674.
- heck seems simpler and actively maintained

We could probably alter the structure of the `str_` module to expose the
individual casing behaviors better.
I did not feel as confident on changing those signatures.

So I took a lazier approach of a macro in the `mod.rs` that creates the public
shimming function to heck's traits.
2021-12-14 09:43:48 -06:00
Jakub Žádník
930cb26e99
Fix hiding of import patterns with globs (#487)
* Fix glob hiding

* Remove docs comment
2021-12-13 20:35:35 +02:00
Darren Schroeder
3701fd1d76
allow user to use hex colors in config (#486) 2021-12-13 09:02:54 -06:00
JT
906c0e6bca
Better filepath completions (#485) 2021-12-13 17:46:30 +11:00
JT
1336acd34a
Seems ps still needs a delay to be accurate (#484) 2021-12-13 16:28:35 +11:00
JT
2013e9300a
Make config default if broken (#482)
* Make config default if broken

* Make config default if broken
2021-12-13 14:16:51 +11:00
Hilmar Gústafsson
90ddb23492
Add Path commands (#280)
* Add Path command

* Add `path basename`

* Refactor operate into `mod`

* Add `path dirname`

* Add `path exists`

* Add `path expand`

* Remove Arc wrapper for args

* Add `path type`

* Add `path relative`

* Add `path parse`

* Add `path split`

* Add `path join`

* Fix errors after rebase

* Convert to Path in `operate`

* Fix table behavior in `path join`

* Use conditional import in `path parse`

* Fix missing cases for `path join`

* Update default_context.rs

* clippy

* Fix tests

* Fix tests

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
Co-authored-by: JT <jonathan.d.turner@gmail.com>
2021-12-13 12:47:14 +11:00
JT
d1d1402512
Add in auto-cd if you pass just a directory (#479)
* Add in auto-cd if you pass just a directory

* clippy
2021-12-13 08:41:34 +11:00
Jae-Heon Ji
6f53912655
Fix: add missing bind commands (#477)
* chore(random): update naming convention

* fix: add missing bind commands
2021-12-12 21:42:04 +02:00
Fernando Herrera
4d7dd23779
Plugin json (#474)
* json encoder

* thread to pass messages

* description for example
2021-12-12 11:50:35 +00:00
Darren Schroeder
f8e6620e48
tweak version output as a list vs table (#472) 2021-12-11 14:40:16 -06:00
Ștefan
7cbeebaac1
Port version (#467)
* First iteration of the version command

* Cleanup

* Fix the installed plugins bug

* Fix fmt check issue

* Fix clippy warning

* Fixing all clippy warnings

* Remove old code
2021-12-11 14:08:17 -06:00
Benoît Cortier
d0119ea05d
Sort default context items categorically (#465)
* Sort default context items categorically

* Separate commands in multiple statements

* Use curly braces instead of square brackets

This prevents undesired reformatting.
2021-12-10 21:07:39 -06:00
Benoît Cortier
e77c6bb284
Port hash, hash md5 and hash sha256 commands (#464)
`hash` by itself is only printing the help message.

The other two are simply using the same generic implementation.
2021-12-10 17:14:28 -06:00
Luccas Mateus
95841e3489
to xml and to yaml (#463) 2021-12-10 14:46:43 -06:00
Luccas Mateus
7a892ec5d7
To html and to md (#453)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* First draft of these commands

* To MD

* To md and to html

* Fixed cargo and to_md

* `into_abbreviated_string` instead of `into_string`

* Changed how inner tables are displayed
2021-12-09 19:16:35 -06:00
Fernando Herrera
865906e450
Dataframe commands name (#457)
* corrected missing shellerror type

* batch dataframe commands

* removed option to find declaration with input

* ordered dataframe folders

* dataframe command name
2021-12-09 18:17:11 -06:00
Michael Angerman
7319b6b168
port over the nth command from nushell (#454)
* port over the nth command from nushell

* remove a line of redundant code

* must sort the rows or else if the rows are not from low to high this crashes engine-q
2021-12-09 18:16:04 -06:00
Jae-Heon Ji
c3b6e07de6
Port network/url command (#452)
* feat: add url command

* feat(network/url): add sub-command for url
2021-12-09 18:09:30 -06:00
pin
15e9c11849
Fix build on NetBSD (#4192) 2021-12-09 14:23:40 +02:00
Justin
1bdcdcca70
fix: change into column_path to into column-path (breaking change) (#4185) (#4189) 2021-12-08 11:04:55 +02:00
Darren Schroeder
8d027a0617
allow decimals/floats to be formatted with precision (#449)
* allow decimals/floats to be formatted with precision

* better error message
2021-12-07 14:06:14 -06:00
JT
610e3911f6
Bump to 0.41 (#4187) 2021-12-08 06:21:00 +13:00
onthebridgetonowhere
11a781fc36
Add uniq command (#447) 2021-12-07 21:47:48 +13:00
Michael Angerman
a42bbea98d
port over the prepend command from nushell (#446) 2021-12-07 21:46:21 +13:00
Fernando Herrera
1fd26727c5
Batch of dataframe commands (#442)
* corrected missing shellerror type

* batch dataframe commands

* removed option to find declaration with input

* ordered dataframe folders
2021-12-06 17:09:49 +13:00
JT
fdde95f675
Update clippy to check all features (#441)
* Update clippy to check all features

* Fix tests

* oops
2021-12-06 07:23:43 +13:00
Jae-Heon Ji
9548e5ef5b
feat(random): add random-integer and random-uuid (#440)
* feat(randome): add random-integer

* feat(random): add random-uuid
2021-12-06 06:22:50 +13:00
Fernando Herrera
29efbee285
corrected missing shellerror type (#439) 2021-12-05 13:25:37 +00:00
Fernando Herrera
22469a9cb1
Improved labeled error from plugins (#437)
* improved labeled error from plugins

* corrected span
2021-12-05 16:11:19 +13:00
Michael Angerman
03e22b071a
port over the reject command from nushell (#419)
* port over reject

* add some tests to src/tests
2021-12-05 16:09:45 +13:00
onthebridgetonowhere
c6aff972da
Cal command (#429)
* Add calendar (cal) command

* Move options into arguments to avoid clippy warnings

* Remove commented line

* Fix formatting issues

* Fix clippy warning
2021-12-05 06:15:03 +13:00
Jae-Heon Ji
82aa84706e
feat(random): add random-dice (#428) 2021-12-05 06:14:24 +13:00
Fernando Herrera
8a06ea133b
removed unwraps (#430) 2021-12-04 12:38:21 +00:00
onthebridgetonowhere
df5ac9b71c
Port str datetime to into datetime (#424)
* Port str datetime to into datetime

* Fix the span issue and some other small cleanups
2021-12-04 16:41:02 +13:00
Jakub Žádník
405a4e58c7
Fix 'help commands'; Add 'is_custom' column (#420)
* Fix fetching commands; Add is_custom column

* Remove old comment
2021-12-03 20:45:29 +02:00
JT
a28d38b05f
Try some fixes for external paths (#415) 2021-12-03 20:40:31 +13:00
JT
574d7f6936
Add table streaming (#413) 2021-12-03 19:15:23 +13:00
Luccas Mateus
3d8394a909
to csv and to tsv (#412)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* ToTsv and ToCsv
2021-12-03 15:02:22 +13:00
onthebridgetonowhere
349e83abd0
Port str to-decimal to into decimal command. (#408)
* Port str to-decimal to into decimal command. Add also a Value::test_float function for tests only

* Add support for handling integers into decimals and fix issues with error span
2021-12-03 15:01:19 +13:00
onthebridgetonowhere
bf82417d52
Port str upcase (#404)
* Port str upcase

* Switch to to_uppercase to support more characters than only ASCII
2021-12-03 15:00:32 +13:00
JT
c5297d2b64
First step (#411) 2021-12-03 12:11:25 +13:00
JT
19766556f3
Add value abbreviations (#407) 2021-12-03 10:07:44 +13:00
onthebridgetonowhere
687fefd791
Remove Arc from Arguments (#405) 2021-12-03 10:07:36 +13:00
JT
ccd5f59314
Update external spawn (#406)
* Simplify external spawn, improve arg cleaning

* Fix tests

* Fix windows test
2021-12-03 09:55:16 +13:00
JT
c08e145501
Fix clippy warnings (#4176) 2021-12-03 07:05:38 +13:00
onthebridgetonowhere
ff673ba0ba
Add the support of str to-int to the into int command (#389) 2021-12-03 06:54:47 +13:00
Jae-Heon Ji
43972db131
feat(random): add random-decimal (#402) 2021-12-03 06:26:12 +13:00
Darren Schroeder
f2aa952e86
add back debug --raw switch (#401)
* add back debug --raw switch

* tweak some debug and other settings
2021-12-02 08:32:12 -06:00
Andrew Houts
79c7b20cfd
add login shell flag (#4175) 2021-12-02 20:05:04 +13:00
JT
45eba8b922
Introduce metadata into the pipeline (#397) 2021-12-02 18:59:10 +13:00
onthebridgetonowhere
2bbba3f5da
Port str trim (#394) 2021-12-02 17:38:44 +13:00
Luccas Mateus
34e0fd622b
to url and to toml (#396)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* ToUrl and ToToml

* Linting
2021-12-02 17:38:00 +13:00
JT
89cbfd758d
Remove 'arboard' (#4174) 2021-12-02 08:48:03 +13:00
Darren Schroeder
d8c721282b
add optional footer to table (#392)
* add optional footer to table

* missed a draw_table
2021-12-01 13:20:23 -06:00
Jae-Heon Ji
d2a1564b94
feat(random): add random-chars (#390) 2021-12-02 07:58:10 +13:00
Darren Schroeder
7cf96c6597
added row_index coloring (#391) 2021-12-01 09:17:50 -06:00
onthebridgetonowhere
b8f1fea7fe
Port str substring command (#388)
* Port str substring command

* Fix issue signaled by cargo fmt
2021-12-01 19:42:57 +13:00
Jakub Žádník
c17e1473db
Hiding of environment variables (#362)
* Remember environment variables from previous scope

* Re-introduce env var hiding

Right now, hiding decls is broken

* Re-introduce hidden field of import patterns

All tests pass now.

* Remove/Address tests TODOs

* Fix test typo; Report hiding error

* Add a few more tests

* Fix wrong expected test result
2021-11-30 19:14:05 +13:00
Jae-Heon Ji
21ddfc61f4
add random commands (#366)
* feat: add random command

* feat: add bool sub-command
2021-11-30 19:12:19 +13:00
Darren Schroeder
ce4d9dc7c6
allow icons to be used in grid -c (#378)
* add icons to grid output. still needs cleanup

* working but adds a dependency on ansi_term - need to fix that

* update styling, added lots of green code to icons

* clippy

* add config point for grid icons
2021-11-29 14:37:09 -06:00
Luccas Mateus
414ed4877a
From ssv from xml (#383)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* From xml and from ssv

* linting
2021-11-30 08:22:13 +13:00
Andrew
5de12da765
Port over the kill command from nushell (#381)
* Port over the kill command from nushell

* Update formatting

* Improve error message by combining signal spans
2021-11-30 07:21:55 +13:00
Braulio Valdivielso Martínez
1794ad51bd
Sanitize arguments to external commands a bit better (#4157)
* fix #4140

We are passing commands into a shell underneath but we were not
escaping arguments correctly. This new version of the code also takes
into consideration the ";" and "&" characters, which have special
meaning in shells.

We would probably benefit from a more robust way to join arguments to
shell programs. Python's stdlib has shlex.join, and perhaps we can
take that implementation as a reference.

* clean up escaping of posix shell args

I believe the right place to do escaping of arguments was in the
spawn_sh_command function. Note that this change prevents things like:

^echo "$(ls)"

from executing the ls command. Instead, this will just print

$(ls)

The regex has been taken from the python stdlib implementation of shlex.quote

* fix non-literal parameters and single quotes

* address clippy's comments

* fixup! address clippy's comments

* test that subshell commands are sanitized properly
2021-11-29 09:46:42 -06:00
Arthur Targaryen
bab8f6bd28
Port skip, skip while and skip until commands (#380)
* Add `Skip` command

* Add `SkipUntil` sub-command

* Add `SkipWhile` sub-command

* Add and use `Expression::as_row_condition_block`
2021-11-29 19:52:23 +13:00
Fernando Herrera
ee239a0d37
testing suite for dataframes (#379) 2021-11-29 19:50:57 +13:00
Andrew
e07ce57423
Port over the sleep command from nushell (#371)
* Port over the sleep command from nushell

* Fix clippy warning

* Remove unused variable
2021-11-29 10:15:32 +13:00
Fernando Herrera
c8b16c14d5
Option to replace command same name (#374)
* option to replace command same name

* moved order of custom value declarations

* arranged dataframe folders and objects

* sort help commands by name

* added dtypes function for debugging

* corrected name for dataframe commands

* command names using function
2021-11-28 19:35:02 +00:00
Andrew
e1e7e94261
Port over the clear command from nushell (#373)
* Port over the clear command from nushell

* cargo fmt
2021-11-28 08:32:44 +00:00
Arthur Targaryen
8c0fa0d26e
Add Any command (#375) 2021-11-28 08:29:35 +00:00
JT
f7f8b0dbff
A few help cleanups (#372) 2021-11-28 07:16:20 +13:00
Arthur
63c3d19c67
Port all? command (#365)
* Implement `From<bool>` for `Value`

* Add `All` command

* Change `IntoPipelineData` and `IntoInterruptiblePipelineData` bounds

* Refactor `PipelineIterator` impls

* Add `PipelineData::into_interruptible_iter`

* Use `into_interruptible_iter` instead of `all` helper

* Merge imports

* Refactor `PipelineData::{filter, map}`

* Change comment pronoun

* Treat `RowCondition` as a block

* Remove unnecessary braces

* Address cluppy warning
2021-11-28 06:49:03 +13:00
Braulio Valdivielso Martínez
fb197f562a
save --append: create file if it doesn't exist (#4156)
* have save --append create file if not exists

Currently, doing:

echo a | save --raw --append file.txt

will fail if file.txt does not exist. This PR changes that

* test that `save --append` will create new file
2021-11-26 12:27:41 -06:00
JT
5d88ed6c75
Add better exit command (#369) 2021-11-26 21:00:57 +13:00
JT
f052b3313d
Move row condition to block (#368) 2021-11-26 16:49:03 +13:00
Edward Betts
3e93ae8af4
Correct spelling (#4152) 2021-11-25 11:11:20 -06:00
Luccas Mateus
8043516d75
from vcf from ics and from ini (#367)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* `from toml` command

* From ods

* From XLSX

* From ics

* From ini

* From vcf

* Forgot a eprintln!
2021-11-26 06:10:56 +13:00
Fernando Herrera
76019f434e
Dataframe feature (#361)
* custom value trait

* functions for custom value trait

* custom trait behind flag

* open dataframe command

* command to-df for basic types

* follow path for dataframe

* dataframe operations

* dataframe not default feature

* custom as default feature

* corrected examples in command
2021-11-23 08:14:40 +00:00
Michael Angerman
a2aaeb38ed
port over the drop command from nushell (#358) 2021-11-22 08:04:20 +13:00
Jakub Žádník
d30dfc63c4
Fix reading of LS_COLORS; ls display symlink (#357)
Also a swing-by fix removing a redundant call to 
std::fs::symlink_metadata().
2021-11-21 01:14:42 +02:00
Darren Schroeder
250743f60f
add coloring by primitive, bring in nu-ansi-term crate (#353)
* add coloring by primitive, bring in nu-ansi-term crate

* clippy
2021-11-20 07:12:35 -06:00
ahkrr
e06df124ca
upgrading dependencies (#4135)
* upgrade dependencies
num-bigint 0.3.1 -> 0.4.3
bigdecimal-rs 0.2.1 -> bigdecimal 0.3.0
s3hander 0.7 -> 0.7.5
bat 0.18 -> 0.18, default-features = false

* upgrade arboard 1.1.0 -> 2.0.1

* in polars use comfy-table instead of prettytable-rs
the last release of prettytable-rs was `0.8.0 Sep 27, 2018`
and it uses `term 0.5` as a dependency

* upgrade dependencies

* upgrade trash -> 2.0.1

Co-authored-by: ahkrr <alexhk@protonmail.com>
2021-11-20 07:11:11 -06:00
Luccas Mateus
00aac850fd
from xlsx from ods and from toml (#352)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* `from toml` command

* From ods

* From XLSX
2021-11-20 08:23:35 +13:00
JT
e01e73cb67
Add debug and describe (#351)
* Add debug and describe

* Fix test
2021-11-19 18:00:29 +13:00
Fernando Herrera
88988dc9f4
Plugins signature load (#349)
* saving signatures to file

* loading plugin signature from file

* is_plugin column for help command
2021-11-19 15:51:42 +13:00
Michael Angerman
adb7eeb740
port over the append command from nushell (#345) 2021-11-19 08:16:04 +13:00
JT
96bdcc4ff7
Fix term width for the table (#346) 2021-11-18 18:48:15 +13:00
Jakub Žádník
f8f437b060
Separate Overlay into its own thing (#344)
It's no longer attached to a Block. Makes access to overlays more
streamlined by removing this one indirection. Also makes it easier to
create standalone overlays without a block which might come in handy.
2021-11-17 17:23:55 +13:00
Fernando Herrera
b35914bd17
Category option for signature (#343)
* category option for signature

* category option for signature

* column description for $scope
2021-11-17 17:22:37 +13:00
JT
2590fcbe5c
Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
onthebridgetonowhere
6fbe02eb21
Port str startswith (#342)
Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-16 12:16:56 +13:00
Jakub Žádník
5459d30a24
Add environment variable support for modules (#331)
* Add 'expor env' dummy command

* (WIP) Abstract away module exportables as Overlay

* Switch to Overlays for use/hide

Works for decls only right now.

* Fix passing import patterns of hide to eval

* Simplify use/hide of decls

* Add ImportPattern as Expr; Add use env eval

Still no parsing of "export env" so I can't test it yet.

* Refactor export parsing; Add InternalError

* Add env var export and activation; Misc changes

Now it is possible to `use` env var that was exported from a module.

This commit also adds some new errors and other small changes.

* Add env var hiding

* Fix eval not recognizing hidden decls

Without this change, calling `hide foo`, the evaluator does not know
whether a custom command named "foo" was hidden during parsing,
therefore, it is not possible to reliably throw an error about the "foo"
name not found.

* Add use/hide/export env var tests; Cleanup; Notes

* Ignore hide env related tests for now

* Fix main branch merge mess

* Fixed multi-word export def

* Fix hiding tests on Windows

* Remove env var hiding for now
2021-11-16 12:16:06 +13:00
Nico Mandery
16db368232
upgrade polars to 0.17 (#4122) 2021-11-16 12:01:02 +13:00
JT
df87d90b8c
Add 'detect columns' command (#4127)
* Add 'detect columns' command

* Fix warnings
2021-11-16 11:29:54 +13:00
Darren Schroeder
ab22619f4a
enable ls_colors for the ls command (#340)
* enable ls_colors for the `ls` command

* added wrapping with ansi-cut so the ansi sequences don't bleed over

* clippy
2021-11-15 14:09:17 -06:00
Benoît Cortier
e324c1a078
Port parse command (#338) 2021-11-16 07:27:15 +13:00
onthebridgetonowhere
50cbd16ec7
Port str reverse (#337)
Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-15 14:43:40 +13:00
onthebridgetonowhere
f1b2ab0b27
Port str lpad and str rpad (#334)
* Port str lpad and str rpad

* Remove useless comment

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-15 08:36:24 +13:00
JT
0f107b2830
Add a config variable with engine support (#332)
* Add a config variable with engine support

* Add a config variable with engine support

* Oops, cleanup
2021-11-15 08:25:57 +13:00
JT
e76451866d
'update' command (#333) 2021-11-14 12:02:54 +13:00
onthebridgetonowhere
08d316f6a7
Port str length command (#330)
Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-14 10:25:55 +13:00
JT
14a2918bba
Fix some nightly clippy warnings (#329) 2021-11-13 13:42:13 +13:00
Luccas Mateus
db2bca56c9
from url and from eml (#324)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* FromEml and FromUrl

Added tests for from eml
2021-11-13 09:46:39 +13:00
onthebridgetonowhere
e756a9ea04
Port str indexof (#327)
* Port str indexof

* Fix clippy warning

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-12 08:45:39 +13:00
JT
568e566adf
Add record literal syntax (#326) 2021-11-11 12:14:00 +13:00
onthebridgetonowhere
586c6d9fa8
Port str find replace (#325)
* Port str find_replace command

* Add regex crate as dependency

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-11 12:11:34 +13:00
Luccas Mateus
75cfee28b2
from yaml and from yml (#322)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables

* `from yaml` and `from yml`

`from yaml` and `from yml`

from yaml and from yml

* Fix collect_string

* Fix tests and linting
2021-11-10 14:02:33 +13:00
onthebridgetonowhere
d094f654c3
Port str endswith (#321)
* Port str endswith command

* Fix clippy warnings

* Styling

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-10 13:51:55 +13:00
JT
bb1740d733
Add from csv and from tsv (#320) 2021-11-10 09:17:37 +13:00
onthebridgetonowhere
0f516a0830
Port str downcase and str contains (#319)
* Port str contains command

* Add another test case / example for str contains

* Port str downcase to engine-q

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-10 09:16:53 +13:00
onthebridgetonowhere
ef20b5f1ef
Port str capitalize (#317)
* Port str capitalize command

* Keep consistent naming for str commands

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-09 20:40:56 +13:00
JT
0a20052799
Fix external output threading and ctrlc (#313) 2021-11-09 19:14:00 +13:00
JT
34617fabd9
Do some str collect cleanup (#312) 2021-11-09 17:46:26 +13:00
JT
47628946b6
Add str collect (#311)
* Add str collect

* Oops, missing file
2021-11-09 14:59:44 +13:00
JT
e9a7def183
Add magic $in variable (#309)
* Add magic in variable

* Oops, missing file
2021-11-08 19:21:24 +13:00
Michael Angerman
cfd40ffaf5
Port over the reverse command from nushell (#303)
* initial commit of reverse
* reverse is working, now move on to the examples
* add in working examples for reverse
* #[allow(clippy::needless_collect)]
2021-11-07 18:18:27 +00:00
JT
00a8752c76
Move where to helper (#302) 2021-11-07 15:40:44 +13:00
Luccas Mateus
7e070e2e5b
Fix "math sum doesn't support streams" (#301)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo

* Deal with streams when they are not tables
2021-11-07 14:20:58 +13:00
Michael Angerman
573cb38bab
Port over the shuffle command from nushell (#300)
* initial commit of shuffle

* port the shuffle command from nushell
2021-11-07 14:19:57 +13:00
onthebridgetonowhere
a1f141d18a
Port str case commands (#287)
* Port camel case and kebab case

* Port pascal case

* Port snake case and screaming snake case

* Cleanup before PR

* Add back cell path support for str case commands

* Add cell path tests for str case command

* Revert "Add cell path tests for str case command"

This reverts commit a0906318d95fd2b5e4f8ca42f547a7e4c5db381a.

* Add cell path test cases for str case command

* Move cell path tests from tests.rs to Examples in each of the command's file

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-07 06:55:25 +13:00
JT
d401ed64ed
Add range to the math reductions (#296) 2021-11-06 20:12:08 +13:00
JT
02b8027749
Improve external output in subexprs (#294) 2021-11-06 18:50:33 +13:00
Luccas Mateus
c7d159a0f3
Last three math commands, eval, variance and stddev (#292)
* MathEval Variance and Stddev

* Fix tests and linting

* Typo
2021-11-06 06:58:40 +13:00
JT
5837cdb3f1 Update the rest of into 2021-11-05 17:57:24 +13:00
JT
183d200b9f Add updating cell paths 2021-11-05 16:59:12 +13:00
Fernando Herrera
ae1109139d Merge branch 'main' of https://github.com/nushell/engine-q into plugins 2021-11-04 22:04:31 +00:00
JT
4a1df604c9
Merge pull request #282 from luccasmmg/engine-q-math
math: floor, ceil, median and mode
2021-11-05 07:10:26 +13:00
JT
d23929fc80
Update mode.rs
trying a switch to native endian
2021-11-05 07:04:02 +13:00
JT
cfd24bc2ad
Merge pull request #285 from nushell/env_shorthand
Add env shorthand
2021-11-04 15:43:10 +13:00
JT
f6d7df5a45
Merge pull request #284 from onthebridgetonowhere/port_first_command
Add back binary support for the first command
2021-11-04 15:42:57 +13:00
JT
2b03748681
Merge pull request #283 from aslynatilla/porting-format
Porting format
2021-11-04 15:41:45 +13:00
JT
1949ba080e Add env shorthand 2021-11-04 15:32:35 +13:00
Stefan Stanciulescu
260838e5ea Switch next_if to next as we already know it's of type Binary 2021-11-03 22:48:12 +01:00
Stefan Stanciulescu
112ebe1842 Add back binary support for first command 2021-11-03 22:44:30 +01:00
Luccas Mateus de Medeiros Gomes
47ebde4087 Added MathMedian
Added MathMedian

Fix tests
2021-11-03 18:28:16 -03:00
Antonio Natilla
bfae75ca2e Clean-up and adding comments 2021-11-03 20:05:24 +01:00
Antonio Natilla
806cd4851f Format implementation, fix on Echo
Now, Echo converts multiple values in a ValueStream, but it simply
forwards a single Value; if no PipelineData is detected as an input, an
empty string is returned as a single Value.
2021-11-03 19:57:30 +01:00
JT
ea27300ca0
Merge pull request #278 from onthebridgetonowhere/port_into_string
Port into string command
2021-11-04 05:59:56 +13:00
Luccas Mateus de Medeiros Gomes
d3e5c5a342 Fix tests 2021-11-03 09:19:28 -03:00
Luccas Mateus de Medeiros Gomes
5ae823612f MathCeil, MathFloor and MathMode 2021-11-03 08:59:08 -03:00
Stefan Stanciulescu
20f3b8b274 Remove unnecessary crate imports 2021-11-03 10:41:01 +01:00
Stefan Stanciulescu
6906de7c48 Ooops fix the wrong naming 2021-11-03 08:48:13 +01:00
Stefan Stanciulescu
bf6c3e53a0 Remove BigDecimal and use i64/f64 instead 2021-11-03 08:38:31 +01:00
Luccas Mateus de Medeiros Gomes
756773a6ed MathFloor done and MathMode still left work
Math mode final form currently

MathMode and MathFloor
2021-11-02 22:33:45 -03:00
Fernando Herrera
12eed1f98a plugin feature flag 2021-11-02 20:56:00 +00:00
Antonio Natilla
d134774f4b Merge remote-tracking branch 'origin' into porting-format 2021-11-02 21:23:50 +01:00
JT
5e42b14026 Documenting some code and doing cleanups 2021-11-03 08:53:48 +13:00
Stefan Stanciulescu
78cc3452df Fix clippy warnings for into string command 2021-11-02 20:51:03 +01:00
Stefan Stanciulescu
070067b75e Add into string command 2021-11-02 20:39:16 +01:00
Antonio Natilla
52cb50b937 Base Command implementation for Format
Note that run is not implemented yet
2021-11-02 18:13:06 +01:00
Stefan Stanciulescu
ce54764bea Fix test case for first command 2021-11-02 09:06:51 +01:00
Stefan Stanciulescu
6e49d0f84b Fix first command to display the first item not as a table 2021-11-02 09:05:03 +01:00
Stefan Stanciulescu
e1ea0d42a9 Merge branch 'main' of https://github.com/nushell/engine-q into port_first_command 2021-11-02 08:32:38 +01:00
JT
7b2116dc29
Merge pull request #270 from elferherrera/plugins
Plugins for engine q
2021-11-02 19:07:45 +13:00
JT
25846d3c1e Add zip command 2021-11-02 18:28:28 +13:00
JT
d856cebebd Add a simple scope variable 2021-11-02 16:08:05 +13:00
JT
3c1b3473ae
Merge pull request #273 from luccasmmg/engine-q-math
New math commands(product, round, sqrt and sum)
2021-11-02 11:20:35 +13:00
JT
89b8ee6ad8
Merge pull request #268 from onthebridgetonowhere/date_enqine_q
Port date commands to enqine-q
2021-11-02 11:18:46 +13:00
Stefan Stanciulescu
4a68c989e4 Fix test for date to-table 2021-11-01 23:05:53 +01:00
Luccas Mateus de Medeiros Gomes
e16b0e7b01 New math commands(product, round, sqrt and sum) 2021-11-01 18:29:34 -03:00
Antonio Natilla
1c2741c598 Fixing run implementation for Echo
Values to echo need to be extracted from the call, and then converted
into PipelineData.

I also updated the first example so that its result is a List,
as in the reference implementation.
2021-11-01 15:43:16 +01:00
Antonio Natilla
89225cf55c Adding examples and test for Echo 2021-11-01 09:37:07 +01:00
Antonio Natilla
f4ed4fa7e3 Implementing Command for Echo, no examples
Referring to:

https://github.com/nushell/nushell/blob/main/crates/nu-command/src/commands/core_commands/echo.rs

as the original implementation.
2021-11-01 09:12:48 +01:00
Fernando Herrera
468b9affde move run_plugin command location 2021-11-01 07:40:05 +00:00
Fernando Herrera
ef94c71866 Merge branch 'main' of https://github.com/nushell/engine-q into plugins 2021-11-01 07:24:33 +00:00
JT
3176f60b5b
Merge pull request #243 from kubouch/module-files
Loading modules from files
2021-11-01 11:08:03 +13:00
Stefan Stanciulescu
ef56d482b2 Port first command to engine-q 2021-10-31 22:53:37 +01:00
Stefan Stanciulescu
304c7a0c92 Remove old code before fixing clippy's warning 2021-10-31 21:08:40 +01:00
Stefan Stanciulescu
8707fbee33 Address clippy's warnings when porting date to engine-q 2021-10-31 21:06:58 +01:00
Stefan Stanciulescu
032356bfb7 Address clippy's warnings when porting date to engine-q 2021-10-31 21:06:44 +01:00
Stefan Stanciulescu
3437dacf0b Change output of date to-table to be a one-row table 2021-10-31 20:53:23 +01:00
JT
80a4a5eb28
Merge pull request #266 from luccasmmg/engine-q-math-2
Added math and min commands
2021-11-01 06:45:16 +13:00
Luccas Mateus de Medeiros Gomes
5add6035a4 Added math and min commands
typo

Added op span
2021-10-31 08:06:32 -03:00
Fernando Herrera
a390f66dbf call and response serializers 2021-10-31 08:17:01 +00:00
Stefan Stanciulescu
fa8a0958e4 Merge branch 'main' of https://github.com/nushell/engine-q into date_enqine_q 2021-10-31 07:56:32 +01:00
Stefan Stanciulescu
20c770370b Port date commands to engine-q 2021-10-31 07:54:51 +01:00
Oscar Dominguez
f94a3e15f5
Get rid of header bold option (#4076)
* refactor(options): get rid of 'header_bold' option

* docs(config): remove 'header_bold' from docs

* fix(options): replicate logic to apply true/false in bold

* style(options): apply lint fixes
2021-10-31 06:59:19 +13:00
Michael Angerman
da515b1c9d port the filter command range from nushell 2021-10-30 10:51:20 -07:00
Fernando Herrera
9838154ad1 round trip call info 2021-10-30 11:19:16 +01:00
Fernando Herrera
f301f686b5 Merge branch 'main' of https://github.com/nushell/engine-q into plugins 2021-10-30 11:01:49 +01:00
JT
624edce4f7 Add 'to json' 2021-10-29 19:26:29 +13:00
Yogi
75782f0f50
Fix #4070: Inconsistent file matching rule for ls and rm (#4099) 2021-10-28 15:05:07 +03:00
Fernando Herrera
51e48bee53 Merge branch 'main' of https://github.com/nushell/engine-q into plugins 2021-10-28 07:12:40 +01:00
JT
520d9e1fb6
Merge pull request #262 from nushell/ctrlc
Add initial ctrl-c support
2021-10-28 17:22:48 +13:00
JT
37150af970
Merge pull request #260 from luccasmmg/engine-q-math-2
Added math avg
2021-10-28 17:14:49 +13:00
JT
bac8b8a450 Add initial ctrl-c support 2021-10-28 17:13:10 +13:00
Luccas Mateus de Medeiros Gomes
40ad9acbc3 Added math avg
Linting

Fix clippy warning

Fix list of records
2021-10-27 22:13:55 -03:00
Michael Angerman
c114f41545 clippy fix 2021-10-27 08:35:42 -07:00
Michael Angerman
9baf720156 add in an example 2021-10-27 08:07:37 -07:00
Michael Angerman
4b31fe1924 code cleanup 2021-10-27 07:25:30 -07:00
Michael Angerman
656e86a7ca got it working by turning it into a vec 2021-10-27 07:19:33 -07:00
Michael Angerman
5d62f1a9c1 compile error to show issue 2021-10-26 21:04:48 -07:00
Michael Angerman
6d6b850911 switched to a working function called rows_to_skip 2021-10-26 20:48:31 -07:00
Jakub Žádník
bd6c550470 Change import pattern delimiter to space
Subcommands and module imports will have the same syntax now.
2021-10-27 00:13:39 +03:00
Michael Angerman
95628bef16 sending off for JT to review 2021-10-26 13:45:10 -07:00
Michael Angerman
ca7ff37697 add in dbg info so I can see what is being matched on 2021-10-26 13:06:26 -07:00
Michael Angerman
0f27249319 Merge branch 'main' into last2 2021-10-26 12:49:08 -07:00
JT
2b06ce27d3
Bump to 0.39 (#4097) 2021-10-27 08:36:41 +13:00
Michael Angerman
3625324bad last is working also with the hard coded length, need to figure out how to get the length of the input 2021-10-26 11:46:03 -07:00
Michael Angerman
7e66aca18e going to have to figure out how to clone input or some other solution 2021-10-26 11:29:00 -07:00
Gabriel Borges Gutierrez
a29c333cb1 ls type lowercase 2021-10-26 15:02:45 -03:00
JT
6b14f9d6b0 Fix par-each signature 2021-10-26 21:16:15 +13:00
JT
29dde84394
Merge pull request #254 from nushell/iter_perf
Some iter perf improvements
2021-10-26 16:28:42 +13:00
JT
543c566ccc Some iter perf improvements 2021-10-26 16:22:37 +13:00
JT
abb6d9f10f Fix par-each example 2021-10-26 14:49:25 +13:00
JT
e039e5f6a4
Merge pull request #252 from nushell/par_each
Add a simple parallel each
2021-10-26 14:37:56 +13:00
JT
9b67899f8d
Merge pull request #248 from luccasmmg/engine-q-math
Engine q math(just one command)
2021-10-26 14:32:03 +13:00
JT
5455270446 Add a simple parallel each 2021-10-26 14:30:53 +13:00
Luccas Mateus de Medeiros Gomes
11d8e6c71f Just removed a few comments 2021-10-25 21:11:20 -03:00
Luccas Mateus de Medeiros Gomes
2ce034d0f0 linting 2021-10-25 20:57:45 -03:00
Luccas Mateus de Medeiros Gomes
017b1d8996 Updated to new PipeLineData and made the tests run 2021-10-25 20:56:22 -03:00
Luccas Mateus
3a5b943d11
Merge branch 'nushell:main' into engine-q-math 2021-10-25 20:40:41 -03:00
JT
766726d0fa Use different helper functions for split column 2021-10-26 12:35:51 +13:00
JT
df07ed5bf6 Remove debug message 2021-10-26 12:12:27 +13:00
JT
962adf5a12 add threading 2021-10-26 11:56:29 +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
5d19017603 WIP 2021-10-26 05:58:58 +13:00
Luccas Mateus de Medeiros Gomes
3f313da4c3 Fix test 2021-10-25 08:10:17 -03: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
Luccas Mateus de Medeiros Gomes
aa5ab8a666 final math abs 2021-10-24 20:58:18 -03:00
Fernando Herrera
232790f488 plugin command 2021-10-23 21:08:54 +01:00
Michael Angerman
297f3ba575 clean up filesystem by moving get_interactive_confirmation into util.rs 2021-10-23 10:57:45 -07:00
Luccas Mateus
51bea2e884 still not working 2021-10-21 12:29:57 -03:00
Luccas Mateus
b1d7e3aa49 starting to build this 2021-10-21 11:52:26 -03:00
JT
b322a12f58 Add more helper functions 2021-10-20 18:58:25 +13:00
JT
1b745015c3 little cleanup 2021-10-16 07:51:25 +13:00
JT
68601629c0 Fix warning 2021-10-16 07:39:36 +13:00
JT
82b0415d92 Try out select completions from dialoguer 2021-10-16 07:37:58 +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
5bd20e4d36 fix clippy warnings 2021-10-15 12:12:17 -03:00
Gabriel B Gutierrez
28b26ca44d supress warnings 2021-10-14 18:14:59 -03:00
Gabriel B Gutierrez
b3192ddc97 fix operating more than 2 file at the same time 2021-10-14 17:03:39 -03:00
Gabriel B Gutierrez
8c2ae1eed1 -i flag finished, lacking tests 2021-10-14 14:54:51 -03:00
Darren Schroeder
fdf6bbb6fc clean up some todo comments in grid 2021-10-14 08:03:20 -05:00
Gabriel B Gutierrez
9ea7cdfc33 -i flag on signaure 2021-10-13 19:29:08 -03:00
JT
5c46138563 Some touchups to size 2021-10-13 17:15:37 +13:00
Justin
f5ce63ad55
Merge branch 'nushell:main' into main 2021-10-12 14:56:45 -07:00
xiuxiu62
151bdc8910 drop unused imports 2021-10-12 14:56:29 -07:00
xiuxiu62
2b99e49792 add strings/size command 2021-10-12 14:55:29 -07:00
xiuxiu62
94d00b28b7 add unicode-segmentation crate 2021-10-12 14:55:07 -07:00
Darren Schroeder
ffd922f393 add ability to parse strings like "100kib" and "100 kib" 2021-10-12 15:22:12 -05:00
JT
6024a001b4 Clarify todo/fixmes 2021-10-13 06:44:23 +13:00
JT
c8277a3da9 Do rest args 2021-10-12 16:28:39 +13:00
JT
1a15f30eb8 Error on missing column during cell path 2021-10-12 08:51:54 +13:00
JT
0676f32509 Merge branch 'main' into earlier_errors 2021-10-12 08:33:19 +13:00
Darren Schroeder
ea9aad9b5d fix to allow windows to compile 2021-10-11 13:58:10 -05:00
JT
38bc394a12 Expose errors early when possible 2021-10-12 07:45:31 +13:00
JT
c4fe190cee
Merge pull request #119 from nushell/error_improvement
Error improvement
2021-10-12 07:08:16 +13:00
JT
ba73e0eb06 Another early emit 2021-10-12 06:37:22 +13:00
JT
0504a7a776 Make errors emit first 2021-10-12 06:35:40 +13:00
Darren Schroeder
0e36b4b1bd
type-o
changes seperator to separator
2021-10-11 09:32:06 -05: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
xiuxiu62
491efab09b remove open and save 2021-10-10 13:24:54 -07:00
JT
ecee5a9845
Update chars.rs 2021-10-11 07:28:33 +13: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
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
789fc30bf9 oops forgot file 2021-10-10 05:14:02 +13:00
JT
e4ce41ba15 Fix the for loop to create vars 2021-10-10 05:10:46 +13: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
2cd1f634d0 Add map and flat_map to value 2021-10-09 19:20:32 +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
4ddc953e38 Port help and start porting split 2021-10-09 14:02:01 +13:00
Darren Schroeder
42113a767a allow one to specify a custom separator 2021-10-08 10:15:07 -05:00
Darren Schroeder
c636c30a19 added a switch to enable coloring 2021-10-08 09:53:26 -05:00
Darren Schroeder
5ddf0d209d respect lscolors env var; measure width minus ansi 2021-10-08 09:40:20 -05:00
Darren Schroeder
1a3a837f3e
Merge pull request #96 from fdncred/ls_grid_output
output `ls` as a grid vs table
2021-10-08 08:23:15 -05:00
Darren Schroeder
c4dabe8327 some cleanup, extra_usage 2021-10-08 08:14:32 -05:00
xiuxiu62
bdfe8c0888 add mkdir command 2021-10-07 15:20:23 -07:00
Darren Schroeder
c4977ae143 clippy 2021-10-07 16:59:01 -05:00
Darren Schroeder
54a41c535b only print items with name column 2021-10-07 16:50:27 -05:00
xiuxiu62
8550f50522 substitute idiomatic call flag check 2021-10-07 14:36:47 -07:00
xiuxiu62
adabc839bf add touch command 2021-10-07 14:18:03 -07:00
Darren Schroeder
698f768a06 Merge branch 'main' into ls_grid_output 2021-10-07 11:07:21 -05:00
Darren Schroeder
ae8b315e76 added list output 2021-10-07 11:00:49 -05:00
Darren Schroeder
58d73d4c23 moved grid to it's own crate named nu-term-grid 2021-10-07 10:32:39 -05:00
JT
7eb022b58c Adapt tk's work for a source command 2021-10-06 15:29:05 +13:00
Tanishq Kancharla
d481d5ca96 Merge branch 'main' of https://github.com/nushell/engine-q into source-command 2021-10-05 22:16:07 -04:00
Tanishq Kancharla
011ad2e4e6 Merge branch 'source-command' of https://github.com/moonrise-tk/engine-q into source-command 2021-10-05 21:59:26 -04:00
Tanishq Kancharla
d6d0bad7aa reverted 2021-10-05 21:59:16 -04:00
JT
b35d47c500
Merge pull request #98 from xiuxiu62/main
port `cp` to fs commands
2021-10-06 11:20:18 +13:00
jacremer
b3b51a2ed6 drop redundant iter -> vec -> iter 2021-10-05 15:09:51 -07:00
xiuxiu62
cc8a470668 clean up unused imports 2021-10-05 14:13:23 -07:00
xiuxiu62
74d4c501a8 add move, recursive fill, and recursive create procedures 2021-10-05 14:08:39 -07:00
Michael Angerman
8536c12bd9 change signature name to get, it was (I believe) incorrectly named wrap 2021-10-05 12:59:17 -07:00
xiuxiu62
8dc3ebd6e2 start cp command 2021-10-05 12:55:46 -07:00
xiuxiu62
5da1310696 add fs utils 2021-10-05 12:55:33 -07:00
Darren Schroeder
7697f7bdce fix doc-test 2021-10-05 12:58:48 -05:00
JT
e1ebd461d2
Bump to 0.28 (#4064) 2021-10-06 06:35:25 +13:00
JT
f000d5d0a1
Remove the broken scrolling support (#4063)
* Remove the broken scrolling support

* Remove the broken scrolling support
2021-10-06 05:57:14 +13:00
Darren Schroeder
51a43f5617 mayve fix ci 2021-10-05 11:14:31 -05:00
Darren Schroeder
11b40a6c31 clippy 2021-10-05 10:30:49 -05:00
Darren Schroeder
3c843f7f61 renamed nu_grid to grid 2021-10-05 10:22:57 -05:00
Darren Schroeder
e402adbba0 WIP: output ls as a grid vs table 2021-10-05 08:43:20 -05:00
jacremer
27dcbe5c8a fix SyntaxShape::Filepath build error 2021-10-04 22:08:15 -07:00
Justin
4eb43adef2
Merge branch 'nushell:main' into main 2021-10-04 22:02:43 -07:00
jacremer
0ef0588e29 mv clippy suggestions 2021-10-04 21:40:26 -07:00
JT
80e7a8d594
Update mv.rs 2021-10-05 16:58:49 +13:00
xiuxiu62
1b96da5e5b add custom filesystem shell errors 2021-10-04 20:43:07 -07:00
JT
31ce8c1e33 Variable completions and better ls 2021-10-05 15:46:24 +13:00
JT
535ece4e76 Add unit parsing and eval support 2021-10-05 15:27:39 +13:00
Josh Cheek
574c5961c8
Add -c flag to select command (#4062)
See cc3653cfd9 for more on the `-c` flag.

Co-authored-by: Andrés N. Robalino <andres@androbtech.com>

Co-authored-by: Andrés N. Robalino <andres@androbtech.com>
2021-10-05 13:23:37 +13:00
JT
7c2bf68d45 Use list completions and better expansion 2021-10-05 10:37:32 +13:00
JT
a88058006a Add path completions 2021-10-05 08:21:31 +13:00
xiuxiu62
b2148e32b8 make mv parameters required 2021-10-04 05:13:47 -07:00
xiuxiu62
e325fd114d port the mv command 2021-10-04 04:32:08 -07:00
Tanishq Kancharla
dfd321a679
Merge branch 'main' into source-command 2021-10-03 14:25:00 -04:00
Tanishq Kancharla
909b7d2160 no-op 2021-10-03 14:23:23 -04:00
JT
75e323ee35 Lines shouldn't trim 2021-10-03 10:56:11 +13:00
JT
758fce8ae3
Merge pull request #86 from nushell/add_cd
Add simple cd
2021-10-03 09:20:28 +13:00
JT
91090e1db1 Add simple cd 2021-10-03 09:16:37 +13:00
JT
b5ec9e0360
Update mod.rs 2021-10-03 06:16:02 +13:00
Jakub Žádník
81cd03626d
Merge branch 'main' into module-export 2021-10-02 18:53:35 +03:00
Hojjat
92c855a412
Fixed two typos in the tutor. (#4051) 2021-10-02 21:37:59 +13:00
JT
6b76dd7cd7 Add select 2021-10-02 17:55:05 +13:00
JT
5843acec02 Add wrap and get and cell_path parsing 2021-10-02 15:59:11 +13:00
Tanishq Kancharla
2d4e471052 fix more merge conflicts 2021-10-01 22:17:32 -04:00
Tanishq Kancharla
16c60f44d5 merge w/ upstream 2021-10-01 22:09:16 -04:00
JT
c5e9ff5f14 add ps and early help 2021-10-02 10:53:13 +13:00
Jakub Žádník
891d79d2aa Fmt and misc fixes after rebase 2021-10-01 23:30:56 +03:00
Jakub Žádník
aa06a71e1f Move new commands to the new structure 2021-10-01 23:24:57 +03:00
Jakub Žádník
244289c901 Add missing file 2021-10-01 23:24:57 +03:00
Jakub Žádník
7488254cca Implement a rough version of 'hide'
'hide' command is used to undefine custom commands
2021-10-01 23:24:54 +03:00
Jakub Žádník
93521da9d8 Add 'export def' command 2021-10-01 23:21:28 +03:00
JT
503939dcbe add sys command 2021-10-01 19:53:47 +13:00
JT
d6e24cceb4 add a vertical record view 2021-10-01 19:01:22 +13:00
JT
3e232a5db8 Add 'from json' 2021-10-01 18:11:49 +13:00
JT
8250b44ce5 moved commands 2021-09-30 07:25:05 +13:00
JT
f0d5e2dcf1 Prepare nu_commands for porting 2021-09-30 07:17:51 +13:00
Darren Schroeder
5e34ef6dff
new command: into column_path (#4048) 2021-09-29 07:23:34 -05:00
ArtoLord
d567c58cc1
Add -c flag to update cells subcommand (#4039)
* Add `-c` flag to `update cells` subcommand

* Fix lints
2021-09-27 21:18:50 -05:00
Squirrel
4e0d7bc77c
Less deps (#4038)
* compiles on nightly now. (breaking change)

* less deps

* Switch over to new resolver

(it's been stable for a while.)

* let's leave num-format for another PR
2021-09-28 07:17:00 +13:00
Tanishq Kancharla
2b5ef1b2d7 Removed extra file 2021-09-27 08:10:45 -04:00
Tanishq Kancharla
719920fa37 tried to move source command into parser (still doesn't compile) 2021-09-27 08:10:18 -04:00
JT
47421e9ca7
Merge pull request #69 from kubouch/simple-module
Primitive module implementation
2021-09-27 05:14:23 +13:00
Jakub Žádník
3f8f3ecf9a Fmt 2021-09-26 14:12:39 +03:00
Jakub Žádník
9e176674a5 Start parsing 'use'; Add Use command 2021-09-26 13:25:52 +03:00
Jakub Žádník
57a07385ac Add leftover Module command file 2021-09-26 13:25:37 +03:00
Jakub Žádník
12cf1a8f83 Allow adding module blocks to engine state 2021-09-26 12:12:32 +03:00
Jakub Žádník
e9f1575924 Add a module command 2021-09-26 01:59:18 +03:00
JT
abac7e3795 improve table for lists 2021-09-26 07:07:37 +13:00
Fernando Herrera
d9c42eb194 contents declaration 2021-09-25 17:28:15 +01:00
Fernando Herrera
25a776c36b trim lines in command 2021-09-25 16:45:02 +01:00
Fernando Herrera
cf60f72452 table as string output 2021-09-25 15:47:23 +01:00
Patrick More
4e6327de1d
Added BigInt handling to the delimited file format for the 'to' command (#4034)
Co-authored-by: patrick <patrick@spol42069.hitronhub.home>
2021-09-25 09:47:16 +12:00
Fernando Herrera
b4977f1515 better print out for stream output 2021-09-24 13:03:39 +01:00
Fernando Herrera
cb9db792a6 filtering empty lines 2021-09-23 20:44:50 +01:00
Fernando Herrera
04990eeba4 allow collect warning 2021-09-23 20:39:42 +01:00
Fernando Herrera
772f8598dd lines command 2021-09-23 20:03:08 +01:00
Fernando Herrera
36c32e9832 input from ValueStream 2021-09-23 18:01:20 +01:00
Fernando Herrera
660e8b5b73 external with redirection 2021-09-23 17:42:03 +01:00
Jakub Žádník
349af05da8
Do not throw error for files not found in lib_dirs (#4029) 2021-09-20 13:44:47 -05:00
Fernando Herrera
6731e3542d clippy errors 2021-09-19 22:05:24 +01:00
Andrés N. Robalino
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
Fernando Herrera
5a6aebfcb2 clippy errors 2021-09-19 21:09:11 +01:00
Fernando Herrera
bafc50fd5c external command 2021-09-19 20:29:58 +01:00
Tom Panton
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
JT
8581bec891
bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
Fernando Herrera
c164ef5489
Update to polars 0.16 (#4013)
* update to polars 0.16

* enabled features for polars
2021-09-16 07:10:12 +12:00
Jakub Žádník
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
1d80a68f4c
bump to 0.37 (#4006) 2021-09-15 06:44:24 +12:00
JT
b4f918b889 Very early proof-of-concept git branch completion 2021-09-14 16:59:46 +12:00
JT
32c1f0c8d4 better it detection and block params in shapes 2021-09-13 19:54:13 +12:00
Jakub Žádník
cc5c4d38bb
Small fixes and refactors to paths & source command (#3998)
* Expand path when converting value -> PathBuf

Also includes Tagged<PathBuf>.

Fixes #3605

* Expand path for PATH env. variable

Fixes #1834

* Remove leftover Cows after nu-path refactor

There were some unnecessary Cow conversions leftover from the old
nu-path implementation.

* Use canonicalize in source command; Improve errors

Previously, `source` used `expand_path()` which does not follow
symlinks.

As a follow up, I improved the source error messages so they now tell
why the source file could not be canonicalized or read into string.
2021-09-12 02:36:14 +03:00
JT
55aa70c88a WIP 2021-09-12 09:26:35 +12:00
Tanishq Kancharla
1d945d8ce3 added source command 2021-09-11 00:54:24 -04:00
JT
26d50ebcd5 Add a very silly table 2021-09-10 14:27:12 +12:00
JT
0fa0c25fb3
Fix clippy warnings (#3997) 2021-09-10 13:13:11 +12:00
JT
c1194b3d1e Add a very silly ls 2021-09-10 13:09:54 +12:00
JT
16baf5e16a Add a very silly ls 2021-09-10 13:06:44 +12:00
Marcin Puc
51c74eebd0
Add general refactorings (#3996) 2021-09-10 10:44:22 +12:00
JT
bb6781a3b1 Add row conditions 2021-09-10 09:47:20 +12:00
JT
6dd9f05ea1 Add an experimental record iteration 2021-09-08 10:00:20 +12:00
JT
a8646f94ab Add cell paths for streams 2021-09-07 19:35:59 +12:00
JT
b0ab78a767 Switch tables to list/streams of records 2021-09-07 19:07:11 +12:00
JT
bdce34676a Allow rest vars to have a custom name 2021-09-07 15:37:02 +12:00
JT
3b99ce71a0 add simple value iteration 2021-09-06 16:16:32 +12:00
JT
96b0edf9b0 range iteration 2021-09-06 16:07:48 +12:00
JT
aaee3a8b61 WIP 2021-09-06 11:16:27 +12:00
Tw
ae9f4135c0
support appending when saving file (#3992)
This patch implements `>>` operation in bash.

Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-05 06:12:08 +12:00
JT
d9cff4238d clippy 2021-09-04 19:59:38 +12:00
JT
5e33b8536b Add discrete list/table 2021-09-04 18:52:28 +12:00
JT
b20c4047d4 Some cleanup, better subexpressions 2021-09-03 19:35:29 +12:00
Andrés N. Robalino
4e2d3ceaaf
Allow knowing the command name tag given no input. (#3988)
```
tags
```
2021-09-03 01:46:15 -05:00
JT
82cf6caba4 Add do 2021-09-03 16:01:45 +12:00
JT
6c0ce95d0f Add simple each 2021-09-03 15:45:34 +12:00
JT
750502c870 Fix up for_in 2021-09-03 14:57:18 +12:00
JT
df63490266 Fix up calls and pipelines 2021-09-03 14:15:01 +12:00
Andrés N. Robalino
c9c6bd4836
Create errors from tables. (#3986)
```
> [
  [          msg,                 labels,                      span];
  ["The message", "Helpful message here", ([[start, end]; [0, 141]])]
] | error make

error: The message
  ┌─ shell:1:1
  │
1 │ ╭ [
2 │ │   [          msg,                 labels,                      span];
3 │ │   ["The message", "Helpful message here", ([[start, end]; [0, 141]])]
  │ ╰─────────────────────────────────────────────────────────────────────^ Helpful message here
```

Adding a more flexible approach for creating error values. One use case, for instance is the
idea of a test framework. A failed assertion instead of printing to the screen it could create
tables with more details of the failed assertion and pass it to this command for making a full
fledge error that Nu can show. This can (and should) be extended for capturing error values as well
in the pipeline. One could also use it for inspection.

For example: `.... | error inspect { # inspection here }`

or "error handling" as well, like so: `.... | error capture { fix here }`

However, we start here only with `error make` that creates an error value for you with limited support for the time being.
2021-09-02 21:07:26 -05:00
Lily Mara
d90420ac4c
Add subcommand into filesize (#3987)
* Add subcommand `into filesize`

It's currently not possible to convert a number or a string containing a number
into a filesize. The only way to create an instance of filesize type today is
with a literal in nushell syntax. This commit adds the `into filesize`
subcommand so that file sizes can be created from the outputs of programs
producing numbers or strings, like standard unix tools.

There is a limitation with this - it doesn't currently parse values like `10 MB`
or `10 MiB`, it can only look at the number itself. If the desire is there, more
flexible parsing can be added.

* fixup! Add subcommand `into filesize`

* fixup! Add subcommand `into filesize`
2021-09-02 18:19:54 -05:00
JT
7c8504ea24 Add commands 2021-09-03 10:58:15 +12:00
JT
3d252a9797 Add nu-protocol 2021-09-02 13:29:43 +12:00
Amin Yahyaabadi
260ff99710
feat: spawn the executables directly if possible (#3974)
* feat: spawn the executables directly if possible

This pull request changes nu-command so that it spawns the process directly if:
- They are a `.exe` on Windows
- They are not a `.sh` or `.bash` on not windows.

Benefits:
- As I explained in [this comment](https://github.com/nushell/nushell/issues/3898#issuecomment-894000812), this is another step towards making Nushell a standalone shell, that doesn't need to shell out unless it is running a script for a particular shell (cmd, sh, ps1, etc.).
- Fixes the bug with multiline strings
- Better performance due to direct spawning.

For example, this script shows ~20 ms less latency.
After:
```nu
C:\> benchmark { node -e 'console.log("sssss")' }
───┬──────────────────
 # │    real time
───┼──────────────────
 0 │ 63ms 921us 600ns
───┴──────────────────
```
Before
```nu
C:\> benchmark { node -e 'console.log("sssss")' }
───┬──────────────────
 # │    real time
───┼──────────────────
 0 │ 79ms 136us 800ns
───┴──────────────────
```

Fixes #3898

* fix: make which dependency optional

Also fixes clippy warnings

* refactor: refactor spawn_exe, spawn_cmd, spawn_sh, and spawn_any

* fix: use which feature instead of which-support

* fix: use which_in to use the cwd of nu

* fix: use case insensitive comparison of the extensions

Sometimes the case of the extension is uppercased by the "which_in" function

Also use unix instead of not windows. Some os might not have sh support
2021-09-01 09:38:52 -05:00
JT
08014c6a98
Move sys, ps, fetch, post to internal commands (#3983)
* Move sys, ps, fetch, post to internal commands

* Remove old plugins

* clippy

Co-authored-by: JT <jonatha.d.turner@gmail.com>
2021-09-01 14:29:09 +12:00
Darren Schroeder
66cedf0b3a
Update char_.rs (#3975)
added a few more chars and abbreviations
2021-08-29 08:40:28 -05:00
Darren Schroeder
707a4ebc15
added more escapes to support ansi art (#3973)
* added more escapes to support ansi art

* fixed some bugs
2021-08-28 14:58:59 -05:00
Jakub Žádník
d95375d494
nu-path crate refactor (#3730)
* Resolve rebase artifacts

* Remove leftover dependencies on removed feature

* Remove unnecessary 'pub'

* Start taking notes and fooling around

* Split canonicalize to two versions; Add TODOs

One that takes `relative_to` and one that doesn't.
More TODO notes.

* Merge absolutize to and rename resolve_dots

* Add custom absolutize fn and use it in path expand

* Convert a couple of dunce::canonicalize to ours

* Update nu-path description

* Replace all canonicalize with nu-path version

* Remove leftover dunce dependencies

* Fix broken autocd with trailing slash

Trailing slash is preserved *only* in paths that do not contain "." or
"..". This should be fixed in the future to cover all paths but for now
it at least covers basic cases.

* Use dunce::canonicalize for canonicalizing

* Alow cd recovery from non-existent cwd

* Disable removed canonicalize functionality tests

Remove unused import

* Break down nu-path into separate modules

* Remove unused public imports

* Remove abundant cow mapping

* Fix clippy warning

* Reformulate old canonicalize tests to expand_path

They wouldn't work with the new canonicalize.

* Canonicalize also ~ and ndots; Unify path joining

Also, add doc comments in nu_path::expansions.

* Add comment

* Avoid expanding ndots if path is not valid UTF-8

With this change, no lossy path->string conversion should happen in the
nu-path crate.

* Fmt

* Slight expand_tilde refactor; Add doc comments

* Start nu-path integration tests

* Add tests TODO

* Fix docstring typo

* Fix some doc strings

* Add README for nu-path crate

* Add a couple of canonicalize tests

* Add nu-path integration tests

* Add trim trailing slashes tests

* Update nu-path dependency

* Remove unused import

* Regenerate lockfile
2021-08-28 15:59:09 +03:00
JT
7fe05b8296
bump to 0.36.1 (#3972) 2021-08-27 20:48:58 +12:00
Darren Schroeder
17ef531905
introducing the find command (#3971)
* introducing the `find` command

* added tests

* merged main to accomodate "rest" changes

* test fix
2021-08-27 20:48:41 +12:00
Hristo Filaretov
b8e2bdd6b1
Allow different names for ...rest (#3954)
* Allow different names for ...rest

* Resolves #3945

* This change requires an explicit name for the rest argument in `WholeStreamCommand`,
  which is why there are so many changed files.

* Remove redundant clone

* Add tests
2021-08-27 05:58:53 +12:00
Hristo Filaretov
88817a8f10
Allow environment variables to be hidden (#3950)
* Allow environment variables to be hidden

This change allows environment variables in Nushell to have a value of
`Nothing`, which can be set by the user by passing `$nothing` to
`let-env` and friends.

Environment variables with a value of Nothing behave as if they are not
set at all. This allows a user to shadow the value of an environment
variable in a parent scope, effectively removing it from their current
scope. This was not possible before, because a scope can not affect its
parent scopes.

This is a workaround for issues like #3920.

Additionally, this allows a user to simultaneously set, change and
remove multiple environment variables via `load-env`. Any environment
variables set to $nothing will be hidden and thus act as if they are
removed. This simplifies working with virtual environments, which rely
on setting multiple environment variables, including PATH, to specific
values, and remove/change them on deactivation.

One surprising behavior is that an environment variable set to $nothing
will act as if it is not set when querying it (via $nu.env.X), but it is
still possible to remove it entirely via `unlet-env`. If the same
environment variable is present in the parent scope, the value in the
parent scope will be visible to the user. This might be surprising
behavior to users who are not familiar with the implementation details.

An additional corner case is the the shorthand form of `with-env` does
not work with this feature. Using `X=$nothing` will set $nu.env.X to the
string "$nothing". The long-form works as expected: `with-env [X
$nothing] {...}`.

* Remove unused import

* Allow all primitives to be convert to strings
2021-08-26 08:15:58 -05:00
Fernando Herrera
3e8ce43dcb
rename command and rename for melt (#3968) 2021-08-26 08:13:54 -05:00
Andrés N. Robalino
9d8845d7ad
Allow custom lib dir path for sourcing nu script libraries. (#3940)
Given we can write nu scripts. As the codebase grows, splitting into many smaller nu scripts is necessary.

In general, when we work with paths and files we seem to face quite a few difficulties. Here we just tackle one of them and it involves sourcing
files that also source other nu files and so forth. The current working directory becomes important here and being on a different directory
when sourcing scripts will not work. Mostly because we expand the path on the current working directory and parse the files when a source command
call is done.

For the moment, we introduce a `lib_dirs` configuration value and, unfortunately, introduce a new dependency in `nu-parser` (`nu-data`) to get
a handle of the configuration file to retrieve it. This should give clues and ideas as the new parser engine continues (introduce a way to also know paths)

With this PR we can do the following:

Let's assume we want to write a nu library called `my_library`. We will have the code in a directory called `project`: The file structure will looks like this:

```
project/my_library.nu
project/my_library/hello.nu
project/my_library/name.nu
```

This "pattern" works well, that is, when creating a library have a directory named `my_library` and next to it a `my_library.nu` file. Filling them like this:

```

source my_library/hello.nu
source my_library/name.nu
```

```

def hello [] {
  "hello world"
}
```

```

def name [] {
  "Nu"
end
```

Assuming this `project` directory is stored at `/path/to/lib/project`, we can do:

```
config set lib_dirs ['path/to/lib/project']
```

Given we have this `lib_dirs` configuration value, we can be anywhere while using Nu and do the following:

```
source my_library.nu

echo (hello) (name)

```
2021-08-26 02:04:04 -05:00
JT
991a4801b1
Bump to 0.36 (#3963) 2021-08-25 06:01:17 +12:00
Fernando Herrera
02b2c55146
Rolling and cumulative commands (#3960)
* rolling and cumulative operations

* update polars to 0.15.1

* change reference in function
2021-08-24 09:10:29 -05:00
JT
487fafbca3
Add a 'tutor' command (#3949)
* Add a 'tutor' command

* clippy
2021-08-21 19:41:54 +12:00