Commit Graph

421 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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