Commit Graph

3413 Commits

Author SHA1 Message Date
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
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
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
Jakub Žádník
b7215b5dde
Fix expected age of mockup files in example tests (#3808) 2021-07-20 18:05:58 -05:00
Fernando Herrera
411435d68f
Dataframe Shape command (#3805)
* size command to get dataframe info

* change command name to shape

* apply lint to file
2021-07-20 07:07:42 -05:00
Darren Schroeder
f656f906ff
Update stale.yml
update days-before-issue-stale to 90 days
2021-07-19 15:03:24 -05:00
Darren Schroeder
d0a7363e64
bat theme wasn't getting set properly (#3807) 2021-07-19 14:54:36 -05:00
Sertac Olgunsoylu
7401fa2fa5
Fix docs for the config variable completion_type (#3804) 2021-07-19 07:20:56 -05:00
Darren Schroeder
181ee1dade
Revert "Unify use of the surf crate (#3777)" (#3783)
This reverts commit 37612345f2.
2021-07-14 20:21:18 -05:00
Fernando Herrera
3645a0f0e4
Updated polars version for faster CSV reader (#3781) 2021-07-14 15:33:21 -05:00
Darren Schroeder
2864eaebae
fixed show_hints option to allow hints to be turned off (#3780) 2021-07-14 09:47:33 -05:00
Daniel Egger
37612345f2
Unify use of the surf crate (#3777)
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.

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2021-07-14 08:47:49 -05:00
Fernando Herrera
bb218b824e
corrected position of dataframes (#3776) 2021-07-14 08:46:32 -05:00
TechWatching
279329bfaa
Add the -s parameter to submit package to winget in pipeline (#3767)
Co-authored-by: Alexandre Nedelec <Alexandre.Nedelec@azeo.com>
2021-07-13 18:35:56 -05:00
JT
71f4ea9d76
Bump to 0.34.0 (#3766) 2021-07-14 05:57:41 +12:00
Bruce Mitchener
1881a297c9
Use shadow-rs 0.6 in nu-cli. (#3759)
`nu-command` was already using `shadow-rs` 0.6, so there were two
copies being built and used. This makes them match up.
2021-07-10 16:11:08 +12:00
Darren Schroeder
56c7a99eb4
Into binary changes (#3758)
* kind of works but not what we really want

* updated `into binary` and `first` to work better together

* attempt to fix wasm build problem

* attempt #2 to fix wasm stuff
2021-07-09 16:43:18 -05:00
Bruce Mitchener
3262ffc1a6
Update s3handler to 0.7 (really 0.7.3). (#3757)
This brings with it a reduction in the number of duplicated
dependencies that it has and the overhead it imposes on our
build.

The number of crates that need to be built for
`cargo build --features extra` drops by roughly 50.
2021-07-10 07:28:07 +12:00
Matheus
5bc7a1f435
#3385: Add unique option for uniq command (#3754)
* Added -u arg for command uniq.

* Update uniq.rs

Co-authored-by: JT <jonathandturner@users.noreply.github.com>
2021-07-10 07:27:35 +12:00
Eli Flanagan
11cb5ed10e
port strings size engine-p (#3690) (#3753)
migrate `size` command to engine-p.

I also tweaked the signature of the primary logic (`size`) to mimic `keep`.

Part of #3390.
2021-07-10 06:45:19 +12:00
mukund
2b80f40164
Remove outdated note in README.md. (#3751) 2021-07-09 06:04:02 +12:00
Darren Schroeder
70215fe480
a few things that make it easier to debug keybindings (#3752) 2021-07-08 08:56:54 -05:00
JT
69fa040361
Fix nothing string comparison (#3750) 2021-07-08 07:21:02 +12:00
Darren Schroeder
720217a5e4
Update stale.yml
update to move it to a cron schedule
2021-07-07 14:09:31 -05:00
Darren Schroeder
1911aad57f
add a couple more features (#3749) 2021-07-07 12:03:59 -05:00
Bruce Mitchener
1943071d12
Simplify is_executable in nu-completion. (#3742)
On Windows, we used the `is-exeuctable` crate but on Unix, we
duplicated the check that it did, with one difference: We also
looked at whether or not it was a symlink.

The `is-executable` crate uses `std::fs::metadata` which follows
symlinks, so this scenario should never occur here, as it will
return the metadata for the target file.

Using the `is-executable` crate on both Unix and Windows lets us
make it non-optional. This lets us remove the `executable-support`
feature. (It is worth noting that this code didn't compile on
Windows when the `executable-support` feature was not specified.)

Right now, there is an alternate code path for `target_arch` being
`wasm32`. This isn't exactly correct as it should probably handle
something different for when the `target_os` is `wasi`.
2021-07-07 07:53:07 -05:00
Darren Schroeder
08c624576c
try to use regular trim commands as much as possible (#3743) 2021-07-07 07:51:52 -05:00
Bruce Mitchener
a99a2ce7e8
Update wasm sample gitignore for node_modules. (#3747)
When building the wasm sample in the way that it is built in CI,
a `node_modules` directory is populated.
2021-07-07 07:48:32 -05:00
Jakub Žádník
56855f9791
Downgrade crossterm to fix pager compilation (#3740)
* Downgrade crossterm to fix pager compilation

With 0.20.0, the `table-pager` feature wouldn't compile.
Closes #3738

* Update Cargo.lock
2021-07-07 15:24:42 +12:00
Darren Schroeder
b32979bc84
^ls doesn't exist on windows (#3745) 2021-07-06 13:14:48 -05:00
Bruce Mitchener
651d425046
Remove ptree dep from nu-command, remove associated feature. (#3741)
Nothing used the `ptree` feature or optional dependency within
`nu-command` except to include it within the `version` output. This
may be related to when `nu-cli` also had a `ptree` feature, but
I'm not sure.

That leaves the code within `nu_plugin_tree` as the sole remaining
user of `ptree`, which is already covered by the feature `tree`
and included in the `version` output.
2021-07-06 10:33:24 -05:00
Bruce Mitchener
d1df9b9e38
Update minus, tui to remove crossterm 0.18 dep. (#3739)
We already depend on crossterm 0.19 (and 0.20), so we can at least
remove the usage of 0.18 by updating minus and tui.
2021-07-06 20:44:07 +12:00
Bruce Mitchener
f603b7ef8b
Remove empty trace feature. (#3732)
In `nu-parser`, this was a relic of when nom was used by the parser
and it would enable using `nom-tracable`.
2021-07-06 07:21:28 +12:00
Daniel Egger
b8c3a10e5b
Bump a few source compatible nu-command dependencies (#3724)
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2021-07-05 19:16:34 +12:00
Daniel Egger
cab181832f
Bump rand version used by nu-command to 0.8 (#3723)
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2021-07-05 16:12:44 +12:00
Fernando Herrera
af2b2c668d
New take command (#3722)
* Type in command description

* filter name change

* Clean column name

* Clippy error and updated polars version

* Lint correction in file

* CSV Infer schema optional

* Correct float operations

* changes in series castings to allow other types

* Clippy error correction

* Removed lists from command signatures

* Added not command for series

* take command with args

* set with idx command
2021-07-05 11:46:53 +12:00
JT
c94c87eec0
Wasm fix (#3729)
* Try to fix azure pipelines

* Try to fix azure pipelines

* Try to fix azure pipelines
2021-07-04 20:11:22 +12:00
TechWatching
4e13c339ec
Submit package to winget during release. (#3717)
Add a new job winget in release.yaml that uses wingetcreate to submit package.
2021-07-01 16:24:38 -05:00
Darren Schroeder
9a1e1d5b1e
move lang command to $nu (#3720) 2021-07-01 13:09:50 -05:00
Fernando Herrera
17008bb648
Removed list from dataframe command signatures (#3713)
* Type in command description

* filter name change

* Clean column name

* Clippy error and updated polars version

* Lint correction in file

* CSV Infer schema optional

* Correct float operations

* changes in series castings to allow other types

* Clippy error correction

* Removed lists from command signatures

* Added not command for series
2021-07-01 16:33:52 +12:00
Andrés N. Robalino
bb5ab5d16c
nu-cli ctrl-c feature support. (#3718)
Seems we do `ctrl` feature checks in `nu-cli` and `nu-command`. We should find a better way to report the enabled features un the `version` command without using the conditionals (or somewhere else)
2021-06-30 19:45:27 -05:00