Commit Graph

6334 Commits

Author SHA1 Message Date
Justin Ma
c902d8bc0c
bump dev version to v0.68.1 (#6504) 2022-09-07 14:27:33 +12:00
JT
b0e5723a68
move back to old names for upcoming release 2022-09-07 06:42:11 +12:00
JT
9273bb3f72
bump to 0.68 (#6501) 2022-09-07 06:29:01 +12:00
Stefan Holderbach
f7d3ccfc70
Pin reedline to 0.11.0 release (#6497)
Includes minor bugfixes around the history

Release notes:

https://github.com/nushell/reedline/releases/tag/v0.11.0
2022-09-06 11:29:51 +02:00
JT
d86350af80
Revert "Make $ on variable names optional (#6434)" (#6446)
This reverts commit 3cb9147f22.
2022-09-06 05:42:47 +12:00
adamijak
14512988ba
Rename all?, any? and empty? (#6464)
Rename `all?`, `any?` and `empty?` to `all`, `any` and `is-empty` for sake of simplicity and consistency.

- More understandable for newcomers, that these commands are no special to others.
- `?` syntax did not really aprove readability. For me it made it worse.
- We can reserve `?` syntax for any other nushell feature.
2022-09-05 16:41:06 +02:00
Stefan Holderbach
33e1120add
Terminate REPL if not connected to tty input (#6480)
* Terminate REPL if not connected to tty input

If the standard input stream is not a TTY abort the REPL execution.

Solves a problem as the current REPL tries to be IO fault tolerant and
would indefinetely fail when crossterm tries to handle the STDIN.

Fixes nushell/nushell#6452

* Improve the error message
2022-09-05 13:33:54 +02:00
unrelentingtech
3278d290be
Avoid update_last_command_context "No command run" error (#6483)
* Avoid update_last_command_context "No command run" error

When using `executehostcommand` bindings without having run actual user input commands yet,
update_last_command_context is guaranteed to fail. A function has been added to reedline
that allows checking for this case.

* Update to most recent reedline

Includes bugfixes around the (SQlite) history

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2022-09-05 13:31:26 +02:00
pwygab
daec3fc3d3
let path split keeps 'C:\' together (#6485)
* `path split` keeps 'C:\' together

* fmt

* fix clippt

* fix match arm
2022-09-04 23:32:09 -07:00
WindSoilder
a6ba58ec41
restrict plugin file name (#6479) 2022-09-04 18:00:20 -05:00
Jakub Žádník
65327e0e7e
Disable cyclical module imports (#6477) 2022-09-04 23:19:20 +03:00
Jakub Žádník
3ed3712fdc
Fix overlays not preserving hidden env vars (#6475)
* Fix overlays not preserving hidden env vars

* Add a few more test

* Add one more test of resetting hidden env vars

* Move removed source-env tests
2022-09-04 20:32:06 +03:00
Jakub Žádník
f46962d236
Fix scoped overlay use not finding a module (#6474)
* Add source-env test for dynamic path

* Use correct module ID for env overlay imports

* Remove parser check from "overlay list"

It would cause unnecessary errors from some inner scope if some
overlay module was also defined in some inner scope.

* Restore Cargo.lock back

* Remove comments
2022-09-04 18:36:42 +03:00
WindSoilder
aa4778ff07
remove useless file (#6472) 2022-09-04 06:39:29 -05:00
pwygab
e81689f2c0
Allow for rejecting nested record cells (#6463)
* add new function to remove data at a cellpath; allow reject to use cellpath

* add tests

* fmt

* fix clippt

* get it working properly with lists of records

* fix clippy, hopefully

* fix clippy, hopefully 2
2022-09-03 07:35:36 -05:00
dependabot[bot]
4656310a1c
Bump lz4-sys from 1.9.3 to 1.9.4 (#6462)
Bumps [lz4-sys](https://github.com/10xGenomics/lz4-rs) from 1.9.3 to 1.9.4.
- [Release notes](https://github.com/10xGenomics/lz4-rs/releases)
- [Changelog](https://github.com/10XGenomics/lz4-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/10xGenomics/lz4-rs/commits)

---
updated-dependencies:
- dependency-name: lz4-sys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-03 07:32:12 -05:00
pwygab
34e58bc5d6
add tests, deal with pipes, newlines, tabs for to nuon (#6391)
* remove unnecessary FlatShape

* add proptest

* remove files that belonged in another PR

* more tests, more chars

* add exception for parser error unrelated ot PR
2022-09-01 14:08:19 +02:00
WindSoilder
fbe9d6f529
Highlight source value as well as failure point. (#6442)
* show multiple errors at once for some commands

* change from invalid item to source value
2022-09-01 12:20:22 +02:00
Ondrej Baudys
e266590813
Fix ps command CPU usage on Apple Silicon M1 macs. #4142 (#6457)
* Fix ps command CPU usage on Apple Silicon M1 macs. #4142

The cpu user and system times returned my libproc are not in
nanoseconds; they are in mach ticks units.  This is not documented very
well.  The convert from mach ticks to ns, the kernel provides a timebase
info function and datatype:

https://developer.apple.com/documentation/driverkit/3433733-mach_timebase_info

The commit makes the PS command work for me.

* Cargo fmt of previous commit.

* Clippy format suggestion

Co-authored-by: Ondrej Baudys <ondrej.baudys@nextgen.net>
2022-09-01 18:09:52 +12:00
unrelentingtech
b27148d14b
Fix build on *BSD, illumos, etc. (#6456)
* nu-path: use 'linux' code on all non-macOS unix

* nu-command: cfg() the Ps command to platforms it's actually implemented on

* nu-system: cfg() the Ps test to the platforms Ps is implemented on
2022-09-01 12:34:26 +12:00
Darren Schroeder
4858a9a817
Revert "Add support for optional list stream output formatting (#6325)" (#6454)
This reverts commit ec4e3a6d5c.
2022-08-31 18:09:40 -05:00
WindSoilder
3ec53e544c
remove capnp protocol for plugin... (#6421)
* remove capnp protocol for plugin...

* remove relative doc
2022-08-31 17:33:30 -05:00
JT
c52d45cb97
Move from source to source-env (#6277)
* start working on source-env

* WIP

* Get most tests working, still one to go

* Fix file-relative paths; Report parser error

* Fix merge conflicts; Restore source as deprecated

* Tests: Use source-env; Remove redundant tests

* Fmt

* Respect hidden env vars

* Fix file-relative eval for source-env

* Add file-relative eval to "overlay use"

* Use FILE_PWD only in source-env and "overlay use"

* Ignore new tests for now

This will be another issue

* Throw an error if setting FILE_PWD manually

* Fix source-related test failures

* Fix nu-check to respect FILE_PWD

* Fix corrupted spans in source-env shell errors

* Fix up some references to old source

* Remove deprecation message

* Re-introduce deleted tests

Co-authored-by: kubouch <kubouch@gmail.com>
2022-09-01 08:32:56 +12:00
Reilly Wood
11531b7630
Upgrade which dependency to fix case on Windows (#6453) 2022-08-31 09:50:18 -07:00
dependabot[bot]
a098a27837
Bump iana-time-zone from 0.1.44 to 0.1.47 (#6448)
Bumps [iana-time-zone](https://github.com/strawlab/iana-time-zone) from 0.1.44 to 0.1.47.
- [Release notes](https://github.com/strawlab/iana-time-zone/releases)
- [Changelog](https://github.com/strawlab/iana-time-zone/blob/main/CHANGELOG.md)
- [Commits](https://github.com/strawlab/iana-time-zone/compare/0.1.44...v0.1.47)

---
updated-dependencies:
- dependency-name: iana-time-zone
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-31 06:19:20 -05:00
Darren Schroeder
2591bd8c63
add more color highlighting to help (#6449) 2022-08-31 20:15:03 +12:00
JT
a03fb946d9
Allow parens around signatures (#6444)
* DRAFT: make var dollar optional

* couple fixes

* fix some tests + cleanup

* allow parens around signature

* clippy
2022-08-30 16:17:10 +12:00
Reilly Wood
9c58f2a522
Disable clickable links in SSH sessions (#6439)
* Disable clickable links in WSL and SSH sessions

* Revert WSL change; disable links in SSH only
2022-08-29 07:52:55 -07:00
JT
3cb9147f22
Make $ on variable names optional (#6434)
* DRAFT: make var dollar optional

* couple fixes

* fix some tests + cleanup
2022-08-29 14:35:55 +12:00
Scott Boggs
f1d72e2670
better error handling for nu_command::env::conig::utils::get_editor (#6430) 2022-08-28 12:56:55 +03:00
WindSoilder
f1e7a01b2e
shows wrong item when each command runs to failed. (#6437)
* add --wrong-item for each command

* fix test

* show multiple errors at once
2022-08-28 11:40:14 +03:00
WindSoilder
b88ace4cde
keep raw for variable inputed argument (#6426)
* keep raw for variable inputed argument

* fix clippy for windows

* make test runs on windows
2022-08-27 08:22:02 -05:00
Jakub Žádník
34d7c17e78
Bring module's environment when activating overlay (#6425) 2022-08-27 01:32:19 +03:00
Darren Schroeder
3f1824111d
add the ast command to peek at the internals of nushell (#6423)
* add the ast command to peak at the internals of nushell

* fixed a bug in an example
2022-08-26 14:48:48 -05:00
WindSoilder
fbae137442
Try to make argument with quotes for external command better (#6420)
* fix arg quote for external

* adjust comment
2022-08-26 06:50:41 -05:00
nibon7
9850424251
Make run_external parameter required (#6418) 2022-08-26 06:31:33 -05:00
Herlon Aguiar
918ec9daa8
nu-command/filters: drop column check positive value (#6412) 2022-08-25 19:03:18 +03:00
nibon7
7b502a4c7f
register-plugin.nu: refactor register plugin (#6409) 2022-08-25 06:57:48 -05:00
nibon7
7b07e976b8
Fix the span of "invalid time zone" (#6411)
Signed-off-by: nibon7 <nibon7@163.com>

Signed-off-by: nibon7 <nibon7@163.com>
2022-08-25 13:21:54 +02:00
pwygab
e45b169cba
default to file completion after first command, add command option for completions (#6257)
* remove unnecessary FlatShape

* add test
2022-08-24 22:46:00 +03:00
Darren Schroeder
5ebfa10495
convert string duration to named duration (#6406) 2022-08-24 14:45:51 -05:00
Reilly Wood
3f93dc2f1d
Always report errors in cp (#6404) 2022-08-24 10:39:28 -07:00
nibon7
a43514deb2
register-plugin.nu: remove .exe extension match to simplify code (#6400)
Signed-off-by: nibon7 <nibon7@163.com>

Signed-off-by: nibon7 <nibon7@163.com>
2022-08-24 06:43:21 -05:00
Stefan Holderbach
ab77bf3289
Fix search terms for str distance (#6398)
Redundancy with the command name is unnecessary and now tested since #6380 
Fixes CI failure
2022-08-24 11:49:03 +02:00
Stefan Holderbach
0afe1e4e67
Test command names and search terms for redundancy (#6380)
* Test commands for proper names and search terms

Assert that the `Command.name()` is equal to `Signature.name`

Check that search terms are not just substrings of the command name as
they would not help finding the command.

* Clean up search terms

Remove redundant terms that just replicate the command name.
Try to eliminate substring between search terms, clean up where
necessary.
2022-08-24 11:16:47 +02:00
Reilly Wood
ef26d539a7
Make cp errors more specific (#6396) 2022-08-23 21:32:41 -07:00
Darren Schroeder
fce8581321
add a plugin registration script (#6395) 2022-08-23 19:38:02 -05:00
Darren Schroeder
ba6abd77c9
add another split words example (#6394) 2022-08-23 13:27:06 -05:00
WindSoilder
a7295c8f1b
Plugin: Add benchmark for different encoding protocol (#6384)
* add MessagePack as a plugin protocol

* tmp merge from remote

* add benchmark

* use less benchmark group, and add README for analysing benchmark result

* update README

* update README

* rewrite

* remove comment

* rename

* fmt

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2022-08-23 11:49:51 -05:00
Stefan Holderbach
2a310ef187
[Experiment] Reenable CI build cache for tests (#6390)
Let's see, if we can use `cargo-cache` again for the tests after #6389
reduced the number of test binaries to build that are quite large due as
they statically link copies of the same engine.
This might be one of the reasons why the tests on windows exceeded the
allotted disk space.
2022-08-23 17:17:33 +02:00