Commit Graph

4951 Commits

Author SHA1 Message Date
JT
083dcd4541 Better for loop 2021-07-30 19:50:39 +12:00
JT
b6f00d07e8 Fix var decl. improve for loop 2021-07-30 19:30:11 +12:00
JT
b0ffaf1c91 add for loop and benchmark 2021-07-30 18:10:40 +12:00
JT
2af61bd07e add correct eval scope 2021-07-30 17:42:33 +12:00
JT
1caae90c02 cleanup some highlighting 2021-07-30 16:43:31 +12:00
JT
184125a70a cleanup some highlighting 2021-07-30 16:38:41 +12:00
JT
7cac5bb633
Merge pull request #5 from jntrnr/string_interp
String interp
2021-07-30 15:34:00 +12:00
JT
53314cb8b2 slightly better coloring 2021-07-30 15:33:33 +12:00
JT
b5e287e065 WIP string interp 2021-07-30 15:26:06 +12:00
Darren Schroeder
1e15f26e98
fix interpolated strings when using unicode (#3866)
* fix interpolated strings when using unicode

* added test case
2021-07-29 19:07:34 -05:00
Darren Schroeder
23ba01d89c
add performance metrics for measuring startup time (#3854)
* add performance metrics for measureing startup time

* removed some comments

* update so tests pass

* update default.toml for tests, merged main

* fix clippy lints

* wording changes
2021-07-29 18:52:40 -05:00
JT
2eeceae613 fix clippy, add strings and concat 2021-07-30 10:56:51 +12:00
Fernando Herrera
653cbe651f
Going deeper (#3864)
* nuframe in its own type in UntaggedValue

* Removed eager dataframe from enum

* Dataframe created from list of values

* Corrected order in dataframe columns

* Returned tag from stream collection

* Removed series from dataframe commands

* Arithmetic operators

* forced push

* forced push

* Replace all command

* String commands

* appending operations with dfs

* Testing suite for dataframes

* Unit test for dataframe commands

* improved equality for dataframes

* moving all dataframe operations to protocol

* objects in dataframes

* Removed cloning when converting to row
2021-07-30 09:16:30 +12:00
JT
f3e487e829
Add named positionals to all (#3863) 2021-07-30 09:12:24 +12:00
Eli Flanagan
9c016ad479
document compiling without openssl (#3862) 2021-07-30 08:21:20 +12:00
JT
e602647d4d
Fix clippy lint and disable broken lint (#3865) 2021-07-30 08:11:47 +12:00
Peter Cunderlik
9696e4d315
Improve md5 and sha256 code (#3841)
* Refactor Hash code to simplify md5 and sha256 implementations

Md5 and Sha256 (and other future digests) require less boilerplate code
now. Error reporting includues the name of the hash again.

* Add missing hash sha256 test
2021-07-29 10:22:16 -05:00
Daniel Egger
7f7af2bbaa
Unify use of the surf crate (#3855)
This brings the features used by the `nu_plugin_fetch` and
`nu_plugin_post` in line and drops the default-features, reducing
the number of pulled-in dependencies and avoiding a second round of
compilations.

Retry of #3777 but with different features, post and fetch plugin tested

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2021-07-29 19:26:38 +12:00
Peter Cunderlik
b190051e15
Fix select to insert nulls in sparse tables instead of ignoring absent values (#3857)
Select used to ignore absent values resulting in "squashing" where
columns for multiple rows could be squashed into a single row.

This fixes the problem by inserting null/nothing into absent value, thus
preserving the structure of rows. This makes sure that all selected
columns are present in each row.
2021-07-28 16:39:42 -05:00
Fernando Herrera
83b28cad8d
Remove dependencies (#3853)
* nuframe in its own type in UntaggedValue

* Removed eager dataframe from enum

* Dataframe created from list of values

* Corrected order in dataframe columns

* Returned tag from stream collection

* Removed series from dataframe commands

* Arithmetic operators

* forced push

* forced push

* Replace all command

* String commands

* appending operations with dfs

* Testing suite for dataframes

* Unit test for dataframe commands

* improved equality for dataframes

* moving all dataframe operations to protocol
2021-07-27 14:20:06 -05:00
ken.chen
ea42a84a4a
Update implementing_a_command.md (#3848)
+  nu-command/src/command.rs has been modified to nu-command/src/mod.rs in nowable version
2021-07-27 09:03:52 -05:00
Darren Schroeder
e4c282f0a6
added the ability to compare time units like 1hr < 2hr (#3845) 2021-07-26 15:19:32 -05:00
Fernando Herrera
d54d7cc431
append dataframes (#3839) 2021-07-26 08:36:09 +12:00
Peter Cunderlik
111477aa74
Add sha256 to the hash command (#3836)
Hashers now uses on Rust Crypto Digest trait which makes it trivial to
implement additional hash functions.

The original `md5` crate does not implement the Digest trait and was
replaced by `md-5` crate which does. Sha256 uses already included `sha2`
crate.
2021-07-25 14:08:08 -05:00
JT
226739d13f
Bump to 0.34.1 (#3835) 2021-07-25 22:58:33 +12:00
Fernando Herrera
f1ee9113ac
All is a DataFrame (#3812)
* nuframe in its own type in UntaggedValue

* Removed eager dataframe from enum

* Dataframe created from list of values

* Corrected order in dataframe columns

* Returned tag from stream collection

* Removed series from dataframe commands

* Arithmetic operators

* forced push

* forced push

* Replace all command

* String commands

* appending operations with dfs

* Testing suite for dataframes

* Unit test for dataframe commands

* improved equality for dataframes
2021-07-25 22:01:54 +12:00
Kat Marchán
9120a64cfb
use chrono_humanize for datetime formatting (#3834)
* use chrono_humanize for datetime formatting

* fix tests
2021-07-25 20:38:45 +12:00
Kat Marchán
fcd624a722
add date humanize command (#3833)
* add `date humanize` command

* add docs
2021-07-25 17:33:31 +12:00
soumil-07
e6af7f75a1
Read from standard input in rm (#3763)
* Read from standard input in `rm`

With this change, rm falls back to reading from the standard input if no
arguments are supplied. This leads to more intuitive pipes as seen in
https://github.com/nushell/nushell/issues/2824

 ls | get name | sort-by | first 20 | each {rm $it} becomes
 ls | get name | sort-by | first 20 | rm

* [Fix] Run cargo fmt, make files a rest parameter, and fix cargo build warnings

* [Fix] Fix clippy suggestions
2021-07-25 15:01:53 +12:00
Darren Schroeder
27f1e7b60c
change describe so it doesn't output colored strings (#3832) 2021-07-25 06:34:11 +12:00
Jakub Žádník
2e24de7f47
Support other variables than PATH in pathvar (2nd attempt) (#3828)
* Fix swapped PATH env var separators

* Support pathvar to manipulate other vars than PATH

* Add tests for pathvar and its subcommands

* Adjust pathvar tests to comply with env quirks

* Make pathvar tests work on non-Windows as well

* Compact the comments in pathvar tests

* Fix last failing test

Co-authored-by: Jakub Žádník <jakub.zadnik@tuni.fi>
2021-07-24 11:44:36 -05:00
Nathan Thomas
e514204db0
Fix wrong path separator (#3829) 2021-07-24 08:42:50 -05:00
JT
a8366ebf15
Merge pull request #4 from jntrnr/wip
Wip
2021-07-24 18:44:57 +12:00
JT
ad48387aa0 WIP 2021-07-24 18:44:38 +12:00
JT
a4bcc1ff3d WIP 2021-07-24 17:57:17 +12:00
JT
fca3a6b75e Support adding variables 2021-07-24 09:46:55 +12:00
JT
6fcdc76059 Improve call eval and live check 2021-07-24 09:19:30 +12:00
Darren Schroeder
0f9e55dac6
Revert "Support other variables than PATH in pathvar (#3791)" (#3827)
This reverts commit f9f39c0a1c.
2021-07-23 09:03:28 -05:00
Peter Cunderlik
5d7677dd07
Implement into path conversion (#3811)
This allows converting strings to filepaths without having to use
`path expand` roundtrip.

Filepaths are taken as-is without any validation/conversion.
2021-07-23 19:14:02 +12:00
Sam Bordo
57073cc6cf
port capitalize to engine-p (#3794)
Part of #3390.
2021-07-23 19:13:11 +12:00
Jakub Žádník
f9f39c0a1c
Support other variables than PATH in pathvar (#3791)
* Fix swapped PATH env var separators

* Support pathvar to manipulate other vars than PATH

* Add tests for pathvar and its subcommands

* Fix PATH env name for Windows

Seems like Windows uses PATH as well.

Co-authored-by: Jakub Žádník <jakub.zadnik@tuni.fi>
2021-07-23 19:11:56 +12:00
JT
3eefa6dec8 start expanding eval 2021-07-23 17:14:49 +12:00
JT
8c6feb7e80 Fix up global span logic 2021-07-23 08:45:23 +12:00
JT
37f8ff0efc Add highlighting 2021-07-23 07:50:59 +12:00
Kat Marchán
d88d7f26e4
fix typo in release.yml (#3824) 2021-07-22 12:42:11 -05:00
Kat Marchán
aeaedd2e5e
Convert templates to github forms (#3818)
* Create feature_request.yaml

* Rename feature_request.yaml to feature_request.yml

* Update feature_request.yml

* Update feature_request.yml

* Create bug_report.yml

* Update bug_report.yml

* Update bug_report.yml

* Update feature_request.yml

* Delete bug_report.md

* Delete feature_request.md
2021-07-23 05:39:20 +12:00
TechWatching
1f4ef3b606
Add worflow to publish package in winget (#3819)
Remove the job in release workflow to publish to winget.
Trigger winget workflow on published release.

Co-authored-by: Alexandre Nedelec <Alexandre.Nedelec@azeo.com>
2021-07-22 11:38:03 -05:00
Fernando Herrera
9b5db297a6
Replace command (#3823)
* replace command

* cargo fmt

* Signature correction
2021-07-22 08:45:46 -05:00
JT
07c22c7e81 Start working on highlighter 2021-07-22 19:48:45 +12:00
JT
1ac0c0bfc5 Move to refcell for permanent parser state 2021-07-22 19:33:38 +12:00