2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-01-29 05:13:31 +00:00
Commit graph

5581 commits

Author SHA1 Message Date
Jakub Žádník
9a482ce284
Overlay keep ()
* Allow env vars to be kept from removed overlay

* Rename --keep to --keep-custom; Add new test

* Rename some symbols

* (WIP) Start working on --keep for defs and aliases

* Fix decls/aliases not melting properly

* Use id instead of the whole cloned overlay

* Rewrite overlay remove for no reason

Doesn't fix the bug but at least looks better.

* Rename variable

* Fix adding overlay env vars

* Add more tests; Fmt + Clippy
2022-05-25 09:22:17 +12:00
Stefan Holderbach
8018ae3286
Pin reedline v0.6.0 for the nushell v0.63.0 release ()
Release notes: https://github.com/nushell/reedline/releases/tag/v0.6.0

This release contains several bug fixes and improvements to the vi-emulation and documentation.

- Improvements to the vi-style keybindings (@sadmac7000):
  - `w` now correctly moves to the beginning of the word.
  - `e` to move to the end of the word.
- Bugfixes:
  - Support terminal emulators that erroneously report a size of 0x0 by assuming a default size to avoid panics and draw nevertheless (@DhruvDh)
  - Fix `ListMenu` layout calculations. Avoids scrolling bug when wrapping occurs due to the line numbering (@ahkrr)
  - Avoid allocating to the total history capacity which can cause the application to go out of memory (@sholderbach)
- Documentation improvements including addition of documentation intended for reedline developers (@petrisch, @sholderbach)
2022-05-24 00:39:55 +02:00
WindSoilder
ef322a24c5
fix date format () 2022-05-23 09:59:34 -07:00
WindSoilder
a8db4f0b0e
load config when requried () 2022-05-23 15:47:08 +03:00
Jason Toffaletti
98a4280c41
Add octal binary literals ()
Schema `0o[77]` with the same padding behavior as the other binary literals

- this updates 
- test for parsing binary from octal
- test for string parsing
2022-05-23 11:01:15 +02:00
Stefan Holderbach
0e1bfae13d
Fallback for config.buffer_editor from EDITOR ()
For the reedline `buffer_editor` use the `EDITOR` and `VISUAL`
environment variables as fallback.

Same resolution order as 

Closes 
2022-05-23 05:32:52 +12:00
Stefan Holderbach
6ff717c0ba
Add meta command for the config subcommands ()
When using `config` without the `config nu` or `config env` subcommands
introduced by  display basic usage like `str`.
2022-05-23 05:31:57 +12:00
WindSoilder
d534a89867
Make flatten works better and predictable ()
* only want to flatten at most one column which contains a list

* make flatten works better

* more readable
2022-05-22 06:22:38 -05:00
pwygab
5bc9246f0f
Allow for test_iteration_errors to work when run as root ()
* allow for test_iteration_errors to work when run as root

* Add comment to skip condition

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
2022-05-22 11:47:03 +02:00
Justin Ma
1e89cc3578
fix typo for version command () 2022-05-22 16:48:39 +08:00
Kangaxx-0
06f5199570
Add config command ()
* Add config command

* Format code

Co-authored-by: Frank Zhang <v-frankz@microsoft.com>
2022-05-22 15:13:58 +12:00
WindSoilder
9e5e9819d6
adjust flatten default behavior () 2022-05-21 08:32:51 -05:00
victormanueltn
1f8ccd8e5e
Add search term to str substring command. () 2022-05-21 11:40:37 +03:00
Yiheng Li
e9d8b19d4d
feat: add search terms to network ()
Co-authored-by: Leyoh Li <leyohli@LeyohdeMacBook-Air.local>
2022-05-20 23:19:17 -04:00
pwygab
7c63ce15d8
attempts to allow the test to work when run as root () 2022-05-20 21:48:36 -05:00
JT
a3a9571dac
Add environment change hook ()
* add environment change hook

* clippy
2022-05-21 09:49:42 +12:00
Stefan Stanciulescu
2cc5952c37
Fix cp bug ()
* Cleanup - remove old commented code

* Force a / or \ to distinguish between folders and files for cp

* Force a / or \ to distinguish between folders and files for cp

* Remove unneeded code

* Add cp test for checking copy to non existing directory

* Fix warning in test
2022-05-21 09:49:29 +12:00
Stefan Holderbach
aa88449f29
Refer to the span of error make if not given ()
* Refer to the span of `error make` if not given

Implements 

Currently the span of the "throwing" `error make`

Also allow to set `msg` and `label` without an additional span.

* Message plus "originates from here" label
2022-05-21 09:48:36 +12:00
Stefan Holderbach
06199d731b
Use bleeding edge reedline, with fix for ()
Fixes  (OOM introduced with  when no config was present and an attempt was
made to allocate all memory in advance)

Includes also other changes to reedline:

- Vi word definition fixed and `w` and `e` work as expected
2022-05-20 17:35:25 +02:00
Justin Ma
0ba86d7eb8
Fix , assume pipe file be zero-sized ()
* Fix , assume pipe file be zero-sized

* rust fmt
2022-05-20 09:27:21 -05:00
WindSoilder
6efd1bcb3f
Don't report error when cwd is not exists. ()
* only set cwd for child process if cwd exists, and avoid showing error when pwd is not exists

* better comment text

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2022-05-20 07:03:03 -05:00
Stefan Holderbach
0d06b6259f
Change miette theme based on ANSI config ()
* Change miette theme based on ANSI config

Use the base ansi colors to simplify the use of the terminal emulator
theming.
Turn of most eye-candy (including unicode) when using
`$config.use_ansi_coloring: false`

Addresses 

* Fix error test affected by changed styling
2022-05-19 13:59:14 -05:00
Stefan Holderbach
8fdc272bcc
Use effectively unlimited history size if not set ()
Fixes 
2022-05-19 12:42:41 -05:00
Stefan Holderbach
0ea7a38c21
Move help menu to canonical F1 binding ()
Currently the fully fledged help menu is bound to `Ctrl-Q`.
Help is widely associated with `F1`.

Before merging check that it is passed through on all platforms and
terminal emulators
2022-05-19 08:24:04 -05:00
WindSoilder
1999e0dcf3
Fix flatten behavior ()
* one step closer to flatten

* integration code is passing, but still need to do one more level flatten for table

* fix flatten

* using match instead of several if let

* make better comment

* fmt code

* better comment
2022-05-19 06:46:48 -05:00
Ian Manske
ac30b3d108
Fix menu panic for empty examples. () 2022-05-19 10:04:56 +02:00
WindSoilder
2b1e05aad0
add quantile column () 2022-05-18 20:47:26 -05:00
pwygab
6c56829976
Allowing for flags with '=' in them to register as flags. ()
* hacky fix for registering flags with '='

* fmt
2022-05-18 11:26:58 -05:00
njbull4
2c58beec13
cp, mv, and rm commands need to support -i flag ()
* restored interactive mode to rm command

* removed unnecessary whitespace in rm file

* removed unnecessary whitespace in rm file

* fixed python-vertualenv build issue

* moved interactive logic to utils file

* restored interactive mode to cp command

* interactive mode for mv wip

* finished mv implementation

* removed unnecessary whitespace

* changed unwrap to expect
2022-05-18 09:53:46 -05:00
Jae-Heon Ji
9c779b071b
feat: apply the --numbered option to acc in reduce command. ()
* feat: apply the `-n` option to acc

* feat: update tests and examples
2022-05-18 09:49:34 -05:00
krober
1e94793df5
Add str title-case ()
Co-authored-by: kyle <kyle@archtop.local>
2022-05-18 08:57:20 -05:00
WindSoilder
7d9a77f179
fix select tests () 2022-05-18 06:20:26 -05:00
WindSoilder
bb079608dd
fix move test ()
* fix move test

* remove ignore
2022-05-18 06:18:21 -05:00
WindSoilder
5fa42eeb8c
Make format support nested column and use variable ()
* fix format for nested structure

* make little revert

* add tests

* fix format

* better comment

* make better comment
2022-05-18 06:08:43 -05:00
krober
3e09158afc
Move capitalize, downcase, upcase to /cases; fix some example descriptions; clarify usage text ()
Co-authored-by: kyle <kyle@archtop.local>
2022-05-18 00:55:43 -04:00
Darren Schroeder
7a78171b34
move items to showcase () 2022-05-17 18:21:14 -05:00
Reilly Wood
633ebc7e43
Revert "Enable backtraces by default ()" ()
This reverts commit 8004e8e2a0.
2022-05-17 15:02:45 -07:00
Darren Schroeder
f0cb2f38df
refactor all write_alls to ensure flushing () 2022-05-17 13:28:18 -05:00
Darren Schroeder
f26d3bf8d7
make print flush () 2022-05-17 09:27:12 -05:00
Emilien Fugier
498672f5e5
feat(errors): more explicit module_or_overlay_not_found_error help message () 2022-05-17 06:22:31 -05:00
Reilly Wood
038391519b
Upgrade trash crate for faster non-Windows builds () 2022-05-16 17:48:41 -07:00
Reilly Wood
8004e8e2a0
Enable backtraces by default () 2022-05-16 17:04:41 -07:00
JT
e192684612
Revert "Try to do less work during capture discovery ()" ()
This reverts commit 5d40fc2726.
2022-05-17 10:49:59 +12:00
JT
5d40fc2726
Try to do less work during capture discovery () 2022-05-17 09:05:26 +12:00
victormanueltn
a22d70718f
Add search terms to build-string command. () 2022-05-16 12:21:01 -07:00
Reilly Wood
24a49f1b0a
Remove doctests action ()
We're no longer using `cargo nextest` for our main test job. The separate action for doctests was only necessary because `cargo nextest` does not support doctests, it can be removed.

Hoping this will result in less data cached but we'll see.
2022-05-16 09:10:00 -07:00
Reilly Wood
04473a5593
Update pull request template for faster clippy+tests
Updating the Clippy and `cargo test` instructions to be more similar to what we do in CI. Will speed things up a bit for contributors.
2022-05-16 08:42:38 -07:00
Darren Schroeder
d1e7884d19
table refactor for readability () 2022-05-16 10:35:57 -05:00
Eric Bouchard
2b96c93b8d
Sync resources version ()
Fix line ending
2022-05-16 09:15:10 -05:00
WindSoilder
fc41a0f96b
use reverse iter on value search () 2022-05-16 06:29:40 -05:00