1
0
mirror of https://github.com/nushell/nushell.git synced 2025-01-13 09:48:30 +01:00
Commit Graph

3389 Commits

Author SHA1 Message Date
WindSoilder
4f7f6a2932
Friendly error message for access beyond end ()
Adds `ShellError::AccessEmptyContent`
2022-10-29 19:47:50 +02:00
Stefan Holderbach
7039602e4d
Move nu-test-support into dev deps on nu-command ()
This reduces the number of dependencies to build for `cargo build` or
`cargo run` by around 19.

Will not speed up CI as we need to `cargo test` but should help for
`cargo install` or users just building from source.
Time saved on my machine ~0.8 secs so likely unnoticable in noise.

Larger future goal is reducing longer dependency chains to allow more
parallel compilation.
2022-10-29 19:39:27 +02:00
Reilly Wood
acb7aff6fb
Fix feature flag for open test () 2022-10-28 20:25:19 -07:00
Darren Schroeder
8940ee6c3f
enable ability to upsert into a list like update () 2022-10-28 18:13:14 -05:00
Max Zhuravsky
3b26b4355e
Fix bug with alias handling when searching for matching brackets ()
* [4325] - fix slicing

* [4325] - fix style
2022-10-28 16:21:24 -05:00
Maxim Zhiburt
66c2a36123
table: Show truncated record differently ()
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2022-10-28 14:00:10 +02:00
Stefan Holderbach
8838815737
Update nix crate to 0.25 and narrow features ()
Avoids compiling the crate twice due to incompatible versions from
dependencies. This avoids binary bloat before linking as well.
Narrow our feature selection to the used modules/functions to save
compile time. On my machine reduces `nix` crate compile time from 
around 9 secs to 0.9 secs.
2022-10-28 01:07:13 +02:00
Stefan Holderbach
834522d002
Fix each while behavior when printing. ()
Fixes 

Warning: `Iterator::map_while` does not return a `FusedIterator`!
Depending on the consuming adaptor or code (e.g. for loop) the iteration
may be stopped but this is not guaranteed.

Adds a test example but Examples handle iterators like
`FusedIterator` and thus don't catch the regression

Cleanup the message on another test
2022-10-27 23:45:45 +02:00
Leon
f281cd5aa3
Update merge to also take single records () 2022-10-27 09:00:26 -07:00
Leon
5add5cbd12
Further edits to help messages () 2022-10-26 09:36:42 -07:00
Andrey Filipenkov
902aad6016
fix description of build-string's second example () 2022-10-26 09:36:31 -05:00
Mel Massadian
13f87857cf
docs: 📝 add "map" to each's search terms () 2022-10-25 21:24:27 +02:00
Reilly Wood
e0cc2c9112
Make get 1 error message better () 2022-10-24 18:22:57 -07:00
Stefan Holderbach
92ab8b831b
Reduce required dependencies for diagnostics ()
Disable backtrace on miette
- gimli crate requires several seconds
Disable diagnostics on wax
- depends on an outdated miette version

Builds fine, no observable loss in diagnostics quality of life

Removes 10 crates that have to be compiled.
2022-10-24 21:42:32 +02:00
Stefan Holderbach
6a7a60429f
Remove unnecessary #[allow(...)] annotations ()
* Remove unnecessary `#[allow]` annots

Reduce the number of lint exceptions that are not necessary with the
current state of the code (or more recent toolchain)

* Remove dead code from `FileStructure` in nu-command

* Replace `allow(unused)` with relevant feature switch

* Deal with `needless_collect` with annotations

* Change hack for needless_collect in `from json`

This change obviates the need for `allow(needless_collect)`
Removes a pessimistic allocation for empty strings, but increases
allocation size to `Value`

Probably not really worth it.

* Revert "Deal with `needless_collect` with annotations"

This reverts commit 05aca98445.

The previous state seems to better from a performance perspective as a
`Vec<String>` is lighter weight than `Vec<Value>`
2022-10-24 20:12:16 +02:00
Stefan Holderbach
79fd7d54b2
Wrap open parse errors from from commands ()
* Wrap `open` parse errors from `from` commands

Minimal fix for 

This propagates the underlying errors from the called `from` commands
and adds a top-level error with the full path and the understood file
extension and resulting called command.

* Repoint inner span for `from ...` to `open`

* Add actionable message: refer to help or use --raw
2022-10-24 20:09:19 +02:00
nibon7
ebca840d91
Add support to render right prompt on last line of the prompt ()
* Add support to render right prompt on last line of the prompt

* reset reedline to main branch

* update reedline to fix right prompt to be rendered correctly

* reset reedline to main branch again
2022-10-23 16:18:26 +02:00
Reilly Wood
17b2bcc125
Support range in str substring () 2022-10-23 11:42:17 +02:00
Leon
24a98f8999
Mildly edited a small handful of help messages ()
* Edited a handful of help messages

* Remove line break as instructed by clippy
2022-10-23 02:02:52 -04:00
Filip Andersson
e49b359848
Bumps Windows 0.37 -> 0.42. () 2022-10-22 17:59:44 -07:00
Access
c9fb381d69
feat: coredump ()
fix issue in https://github.com/nushell/nushell/issues/5903
return Error to pipeline_data, if match error, then return error
directly
2022-10-22 20:24:58 +02:00
Max Zhuravsky
8224ec49bc
Highlight matching brackets / parentheses ()
* [4325] - wip

* [4325] - hightlight only matched symbol

* [4325] - cleanup

* [4325] - match bracket while typing

* [4325] - fix clippy

* [4325] - add bracket highlight configuration

* [4325] - fix working with non-ascii
2022-10-22 11:55:45 -05:00
Reilly Wood
fe7e87ee02
Fixes for ps on Linux ()
* Fix ps returning nothing when process dies

* Fix ps CPU calcs on Linux, remove unused thread code
2022-10-22 11:54:46 -05:00
Maxim Zhiburt
a3dce8ff19
table -e Fix stackoverflow (cause endless empty list) ()
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2022-10-22 11:52:32 -05:00
Chris Denton
89f3cbf318
Try not to use verbatim paths for UNC shares () 2022-10-22 11:51:52 -05:00
pwygab
3f555a6836
add more helpful error for calling a decl that exists in a module ()
* add more helpful error for calling a decl that exists in a module

* accord to suggestions

* make error more helpful
2022-10-22 11:41:31 -05:00
Dan Davison
1ec41a0ab4
Expose reedline EditCommand::Complete command ()
This should have been done in 5eee33c7e4
2022-10-22 11:32:07 -05:00
nibon7
ab0a6b6ca6
path: fix error message ()
Closes 
2022-10-22 06:42:46 -05:00
Reilly Wood
e3bf6fdfc0
Print command help in base from+to commands () 2022-10-21 10:08:57 -07:00
Maxim Zhiburt
46c0d29c08
table/ Fix paging indexing ()
* table/ Fix paging indexing

close 

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>

* Add test for pagging with row_overlapping

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2022-10-21 18:02:25 +02:00
Reilly Wood
76ccd5668a
Remove perf flag to streamline logging configuration () 2022-10-21 10:20:21 -05:00
nibon7
c6436eb32f
rm: don't update target_exists every time in the loop () 2022-10-21 07:42:29 -07:00
Maxim Zhiburt
b2c29117d9
table -e align key to 2nd line ()
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2022-10-21 06:29:55 -05:00
nibon7
60df45a390
Add missing shape_directory to default_config.nu ()
Closes 
2022-10-20 21:25:09 -07:00
WindSoilder
10aa86272b
Allow captured stderr saving to file ()
* support redirect stderr to file

* fix test

* fix test

* fix test
2022-10-20 07:56:44 -05:00
Maxim Zhiburt
d37e6ba3b5
nu-table: Check perf improvements ()
* nu-table: Checkout to test vte parsing

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>

* Bump tabled version

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2022-10-20 07:52:15 -05:00
Dan Davison
5eee33c7e4
Tab inline completion ()
* Make Tab insert (partial) completion instead of select next menu item

* Use reedline feature branch

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-10-20 23:39:48 +13:00
pwygab
5e748ae8fc
make ++ append lists ()
* make `++` append lists

* fmt

* fix for database
2022-10-20 23:28:18 +13:00
Dan Davison
50e53e788a
Simplify and reduce allocations in pipeline data loop () 2022-10-20 23:22:07 +13:00
nibon7
7336e1df1a
rm: fix error span when targets doesn't exists ()
Closes 
2022-10-20 10:00:25 +02:00
Darren Schroeder
a724a8fe7d
bump to dev version 0.70.1 () 2022-10-20 18:04:10 +13:00
JT
c731a4e275
Update Cargo.toml 2022-10-19 11:44:04 +13:00
JT
9ef65dcd69
Bump to 0.70 () 2022-10-19 07:13:36 +13:00
JT
f99c002426
Fix let-env in banner () 2022-10-18 22:42:00 +13:00
Stefan Holderbach
f0420c5a6c
Pin reedline to the 0.13.0 release ()
See the release notes:

https://github.com/nushell/reedline/releases/tag/v0.13.0
2022-10-17 23:45:28 +02:00
Stefan Holderbach
803f9d4daf
Upgrade reedline to latest dev version ()
* Reorder conditional deps for readability

* Pull reedline from the most recent main branch

* Map 'Submit' and 'SubmitOrNewline' events
  Introduced by 
2022-10-16 23:51:15 +02:00
Dan Davison
ce809881eb
Rename query dfr -> query df () 2022-10-16 21:04:48 +02:00
Russell Chan
ec8e57cde9
Add search terms to roll commands () 2022-10-16 13:04:22 +02:00
WindSoilder
a498234f1d
fix stdout hangged on () 2022-10-15 14:29:29 -05:00
Darren Schroeder
de77cb0cc4
add filesize_metric comment () 2022-10-15 14:26:18 -05:00