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