Commit Graph

825 Commits

Author SHA1 Message Date
Jakub Žádník
124561ff12
Rename add_decls() to use_decls() (#395)
To reflect better what the method actually does.
2021-12-02 00:25:51 +02: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
Stefan Holderbach
3916ac4165
Fix busy poll with reedline (#387)
Fixes #386

Makes the changes to accept https://github.com/nushell/reedline/pull/188

Change CLI option EQ_PROMPT_ANIMATE_MS to binary EQ_PROMPT_ANIMATE
2021-11-30 09:59:54 -06: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
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
Darren Schroeder
6d58e2b51e
enable env setting for prompt animation (#376)
* enable env setting for prompt animation

* default to on

* updated comment
2021-11-28 15:09:52 -06: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
JT
0ba0daa2c4
Update TODO.md 2021-11-27 20:18:40 +13: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
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
JT
6a1942b18f
Update reedline for multiline prompt (#364) 2021-11-24 20:28:29 +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
JT
143855b662
Add better comment skipping (#359) 2021-11-22 07:13:09 +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
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
JT
ff43ca4d24
Better record types (#350) 2021-11-19 17:30:27 +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
JT
aa7226d5f6
Expand globs and filepaths (#348) 2021-11-19 08:32:27 +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
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
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
JT
42367ddf6d
Add support for crlf for line continuations (#341) 2021-11-16 07:33:33 +13:00
Benoît Cortier
e324c1a078
Port parse command (#338) 2021-11-16 07:27:15 +13:00
Michael Angerman
4fd020ab7f
delete the file row.rs in nu-protocol/value which has references to RowStream (#339) 2021-11-15 18:43:11 +13:00
onthebridgetonowhere
50cbd16ec7
Port str reverse (#337)
Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2021-11-15 14:43:40 +13:00
JT
be827e5628
Fix multiword imports/exports (#336) 2021-11-15 08:40:26 +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