Commit Graph

836 Commits

Author SHA1 Message Date
JT
8e98df8b28
bump to dev version (#5635) 2022-05-25 19:09:44 -05:00
Reilly Wood
2daf8ec72d
cargo update (#5639) 2022-05-25 13:13:14 -04:00
Reilly Wood
afcacda35f
Change embed-resource dep to slimmer winres (#5630) 2022-05-24 23:28:10 -04:00
JT
06cf3fa5ad
Bump to 0.63 (#5627) 2022-05-25 11:33:28 +12:00
Stefan Holderbach
8018ae3286
Pin reedline v0.6.0 for the nushell v0.63.0 release (#5620)
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
Stefan Holderbach
06199d731b
Use bleeding edge reedline, with fix for #5593 (#5598)
Fixes #5593 (OOM introduced with #5587 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
Darren Schroeder
f0cb2f38df
refactor all write_alls to ensure flushing (#5567) 2022-05-17 13:28:18 -05:00
Reilly Wood
038391519b
Upgrade trash crate for faster non-Windows builds (#5563) 2022-05-16 17:48:41 -07:00
Fernando Herrera
8bd68416e3
Lazy dataframes (#5546)
* lazyframe definition

* expressions and lazy frames

* new alias expression

* more expression commands

* updated to polars main

* more expressions and groupby

* more expressions, fetch and sort-by

* csv reader

* removed open csv

* unique function

* joining functions

* join lazy frames commands with eager commands

* corrected tests

* Update .gitignore

* Update .gitignore

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-05-16 08:27:43 +01:00
Reilly Wood
d90b25c633
Look up git commit hash ourselves, drop libgit2 dependency (#5548) 2022-05-16 13:57:25 +12:00
Carl Schierig
ec804f4568
nu-command ls - bump umask crate to 2.0.0 (#5514) 2022-05-11 16:13:45 -05:00
JT
374757f286
Bump to the 0.62.1 dev version (#5473) 2022-05-08 08:38:12 +12:00
Darren Schroeder
768ff47d28
enable cd to work with directory abbreviations (#5452)
* enable cd to work with abbreviations

* add abbreviation example

* fix tests

* make it configurable
2022-05-06 07:58:32 -05:00
JT
d306b834ca
Bump to 0.62 (#5422) 2022-05-04 09:01:27 +12:00
Stefan Holderbach
d4371438d1
Pin reedline to v0.5.0 for the next release (#5427)
Release notes: https://github.com/nushell/reedline/releases/tag/v0.5.0

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-05-04 08:11:31 +12:00
Fernando Herrera
6a972312d4
added open editor event in config parsing (#5426) 2022-05-04 07:52:53 +12:00
Maxim Zhiburt
ac48f5a318
Fix coloring when string has spaces (#5425)
* Replace ansi-cut with ansi-str

There's no issues with it we just need to use it later.

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

* Fix color losing in string spliting into Sublines

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2022-05-03 09:48:43 -05:00
Yuheng Su
bb27b9f371
Don't resuggest accepted completions (#5369)
To avoid resuggesting the same completion, add a space after commands or flags that have been accepted via `Enter`. Don't do that for filepaths or external completions

* Add append_whitespace choice for suggestion

Signed-off-by: gipsyh <gipsyh.icu@gmail.com>

* Fixed `test <path>` appending space.

* Update reedline

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2022-05-02 11:35:37 +02:00
Stefan Holderbach
1f7d3498cd
Bump reedline (#5404)
- Fix to the `ClearScrollback` command
- Fix of vi mode `x` so it adds the character to the clipboard
- Vi mode shorthands `s` and `S`
2022-05-02 13:14:24 +12:00
Richard
260be40774
Update reedline to use partial completion changes (#5401) 2022-05-02 08:41:25 +12:00
Fernando Herrera
435693a8bb
Line buffer keybinding (#5390)
* dabase access commands

* select expression

* select using expressions

* cargo fmt

* change keybinding
2022-05-01 08:59:49 +01:00
Fernando Herrera
9da2e142b2
Line buffer editor (#5381)
* allow line editing

* cargo fmt
2022-04-30 15:40:41 +01:00
Darren Schroeder
2659ea3dbd
Revert "nu-cli/completions: better fix for files with special characters (#5254)" (#5372)
This reverts commit 3cf3329e49.
2022-04-29 13:11:41 -05:00
Reilly Wood
f2d7454330
Add watch command (#5331) 2022-04-28 09:26:34 -05:00
Herlon Aguiar
3cf3329e49
nu-cli/completions: better fix for files with special characters (#5254)
* nu-cli/completions: fix paths with special chars

* add backticks

* fix replace

* added single quotes to check list

* check escape using fold

* fix clippy errors

* fix comment line

* fix conflicts

* change to vec

* skip sort checking

* removed invalid windows path

* remove comment

* added tests for escape function

* fix fn import

* fix fn import error

* test windows issue fix

* fix windows backslash path in the tests

* show expected path on error

* skip test for windows
2022-04-28 08:36:32 -05:00
Reilly Wood
55e5106695
Statically link OpenSSL (#5349) 2022-04-28 12:25:09 +12:00
Fernando Herrera
5c9fe85ec4
Database commands (#5343)
* dabase access commands

* select expression

* select using expressions

* cargo fmt
2022-04-27 11:52:31 +01:00
merelymyself
b38f90d4c7
Adding ~user tilde recognition in file paths (#5251)
* Added search terms to math commands

* Attempts to add ~user.

From: // Extend this to work with "~user" style of home paths

* Clippy recommendation

* clippy suggestions, again.

* fixing non-compilation on windows and macos

* fmt apparently does not like my imports

* even more clippy issues.

* less expect(), single conversion, match. Should work for MacOS too.

* Attempted to add functionality for windows: all it does is take the home path of current user, and replace the username.

* silly mistake in Windows version of user_home_dir()

* Update tilde.rs

* user_home_dir now returns a path instead of a string - should be smoother with no conversions to string

* clippy warnings

* clippy warnings 2

* Changed user_home_dir to return PathBuf now.

* Changed user_home_dir to return PathBuf now.

* forgot to fmt

* fixed windows build errors from modifying pathbuf but not returning it

* fixed windows clippy errors from returning () instead of pathbuf

* forgot to fmt

* borrowed path did not live long enough.

* previously, path.push did not work because rest_of_path started with "/" - it was not relative. Removing the / makes it a relative path again.

* Issue fixed.

* Update tilde.rs

* fmt.

* There is now a zero chance of panic. All expect()s have been removed.
2022-04-24 17:12:57 -05:00
Richard
9771270b38
Fuzzy completion matching (#5320)
* Implement fuzzy match algorithm for suggestions

* Use MatchingAlgorithm for custom completions
2022-04-24 16:43:18 -05:00
Fernando Herrera
e94d13da1b
Database commands (#5307)
* database commands

* db commands

* filesystem opens sqlite file

* clippy error

* corrected error in ci file

* removes matrix flag from ci

* flax matrix for clippy

* add conditional compile for tests

* add conditional compile for tests

* correct order of command

* correct error msg

* correct typo
2022-04-24 10:29:21 +01:00
Darren Schroeder
e2b510b65e
update sys with new items, add kernel version to os-info (#5308)
* update sys with new items, add kernel version to os-info

* clippy
2022-04-23 16:33:27 -05:00
Reilly Wood
a26272b44b
Clean up tests and unused documentation code (#5273)
* Delete unused documentation code+test

* Fix up test to account for new select behavior
2022-04-21 06:13:58 -05:00
Jaffar Ashoor
0fb6f8f93c
refactor html module (#5246)
* refactor around html module

* Update html.rs

fix clippy warning

* minify json
2022-04-20 08:50:14 -05:00
Stefan Holderbach
995d8db1fe
Set to reedline main branch for development cycle (#5249)
Changes to reedline since `v0.4.0`:

- vi normal mode `I` for inserting at line beginning
- `InsertNewline` edit command that can be bound to `Alt-Enter` if
desired to have line breaks without relying on the `Validator`
- `ClearScreen` will directly clear the visible screen. `Signal::CtrlL` has been
removed.
- `ClearScrollback` will clear the screen and scrollback. Can be used to
mimic macOS `Cmd-K` screen clearing. Helps with #5089
2022-04-20 21:10:33 +12:00
Herlon Aguiar
4d7b86f278
nu-cli: added tests for file completions (#5232)
* nu-cli: added tests for file completions

* test adding extra sort

* Feature/refactor completion options (#5228)

* Copy completion filter to custom completions

* Remove filter function from completer

This function was a no-op for FileCompletion and CommandCompletion.
Flag- and VariableCompletion just filters with `starts_with` which
happens in both completers anyway and should therefore also be a no-op.
The remaining use case in CustomCompletion was moved into the
CustomCompletion source file.

Filtering should probably happen immediately while fetching completions
to avoid unnecessary memory allocations.

* Add get_sort_by() to Completer trait

* Remove CompletionOptions from Completer::fetch()

* Fix clippy lints

* Apply Completer changes to DotNuCompletion

* add os to $nu based on rust's understanding (#5243)

* add os to $nu based on rust's understanding

* add a few more constants

Co-authored-by: Richard <Tropid@users.noreply.github.com>
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2022-04-20 16:54:00 +12:00
Kat Marchán
1314a87cb0
update miette and switch to GenericErrors (#5222) 2022-04-19 00:34:10 +12:00
JT
5bf1c98a39
Move to dev version 0.61.1 (#5206) 2022-04-16 09:29:30 +12:00
Darren Schroeder
581afc9023
updated cargo.lock with cargo update (#5201) 2022-04-15 06:04:15 -05:00
Reilly Wood
c150e11cb4
Initial SQLite functionality (#5182)
* Add SQLite functionality to open

* Add in-memory SQLite tests

* clippy fixes

* Fix up old SQLite-related tests
2022-04-13 20:15:02 -07:00
Kat Marchán
3783c19d02
bump miette to 4.4.0 (#5167)
This fixes an issue where docsrs error links were not working.

Ref: https://github.com/zkat/miette/issues/147
2022-04-13 08:38:15 +12:00
JT
4566c904d0
Bump 0.61 (#5166) 2022-04-13 05:42:26 +12:00
Stefan Holderbach
9b020c056b
Pin reedline version for 0.61 release (#5164) 2022-04-13 04:38:36 +12:00
JT
60b5863058
Remove the im crate dependency (#5161) 2022-04-12 07:01:05 +12:00
Stefan Holderbach
836f914163
Clean REPL code, hide Hints without ANSI coloring (#5157)
- With a change to reedline hints can now be hidden. This is useful when
no ANSI coloring is available as hints become indistinguishable from the
actual buffer
- remove commented out code
- order the logging calls according to the implementation
2022-04-12 06:19:42 +12:00
Stefan Holderbach
625e807a35
Support unbinding a particular key event (#5152)
To remove a default keybinding for a particular edit mode, set the `event: null`:

e.g. to disable screen clearing with Ctrl-L

```
let $config = {keybindings: [{
        modifier: control
        keycode: char_l
        mode: [emacs, vi_normal, vi_insert]
        event: null
      } ]}

```
2022-04-10 23:54:09 +02:00
Reilly Wood
58f395989a
Remove unused dependencies (#5145)
* Remove unused packages from base Cargo.toml

* Remove unused crossterm_winapi from nu-cli

* Remove unused dependencies from nu-system

* Remove unused dependencies from nu-test-support
2022-04-10 09:14:55 +12:00
Fernando Herrera
6b4cb8b0e0
short descriptions (#5130) 2022-04-08 07:57:39 +01:00
Robert Broketa
690ec9abfa
Implement rest of touch flags (#5119)
* Add timestamp flag to `touch` command

* Add modify flag to `touch` command

* Add date flag to `touch` command

* Remove unnecessary `touch` test and fix tests setups

* Change `touch` flags descriptions

* Update `touch` example

* Add reference flag to `touch` command

* Add access flag to `touch` command

* Add no-create flag to `touch` command

* Replace `unwrap` with `expect`
2022-04-07 06:44:05 -05:00
Reilly Wood
b2c52b51b7
Change string contains operators to regex (#5117) 2022-04-07 18:23:14 +12:00
sholderbach
80f21d37e0
Update reedline to mut Completer API 2022-04-04 23:35:31 +02:00
Darren Schroeder
e2cf4cc7d6
new glob command (#5087) 2022-04-05 08:45:01 +12:00
Darren Schroeder
4654f03d31
update shadow-rs, update git2, remove indexmap from version (#5086) 2022-04-04 09:59:59 -05:00
Fernando Herrera
608b6f3634
Generic menus (#5085)
* updated to reedline generic menus

* help menu with examples

* generic menus in the engine

* description menu template

* list of menus in config

* default value for menu

* menu from block

* generic menus examples

* change to reedline git path

* cargo fmt

* menu name typo

* remove commas from default file

* added error message
2022-04-04 15:54:48 +01:00
Fernando Herrera
a088081695
update reedline (#5062) 2022-04-01 19:22:40 +01:00
Stefan Holderbach
2193910579
Update reedline to new constructor API (#5051) 2022-04-01 11:16:28 +13:00
Stefan Holderbach
0986c61a5d
Lift line editor construction out of loop (#5041)
Enables the use of some features on reedline

- Keeping the line when clearing the screen with `Ctrl-L`
- Using the internal cut buffer between lines
- Submitting external commands via keybinding and keeping the line

Additional effect:

Keep the history around and do basic syncs (performance improvement
minimal as session changes have to be read and written)

Additional change:

Give the option to defer writing/rereading the history file to the
closing of the session ($config.sync_history_on_enter)
2022-03-31 23:25:48 +02:00
Fernando Herrera
e934062542
corrects menu selection (#5004) 2022-03-28 20:43:27 +13:00
Fernando Herrera
a4410fef40
Help menu (#4992)
* nu-completer with suggestions

* help menu with scrolling

* updates description rows based on space

* configuration for help menu

* update nu-ansi-term

* corrected test for update cells

* changed keybinding
2022-03-27 14:01:04 +01:00
Darren Schroeder
ee5064abed
Nu ansi term update (#4988)
* WIP: Testing 0.45.1 nu-ansi-term with the new Default colors

* point reedline to git in cargo.toml
2022-03-27 16:57:31 +13:00
JT
82e3bb0f38
Bump nushell to 0.60.1 (#4987) 2022-03-27 16:18:47 +13:00
Michael Angerman
2252833917
bump cargo crate sys-locale to the latest version (#4957) 2022-03-25 10:00:35 -07:00
JT
1c964cdfe7
Bump to 0.60 (#4892)
* WIP

* semi-revert metadata change
2022-03-23 07:32:03 +13:00
Fernando Herrera
d6669d3f33
Polars update (#4875)
* update to polars 0.20

* add to date parser for series
2022-03-19 11:13:34 +00:00
Darren Schroeder
6700fbeed7
rename update to upsert to mirror what it really does (#4859)
* rename `update` to `upsert` to mirror what it really does

* change to latest reedline and nu-ansi-term
2022-03-16 19:13:34 -05:00
Darren Schroeder
ca12f39db3
added nu-utils crate, fixed issue where externals turn off vt processing (#4857)
* added `nu-utils` crate, fixed issue where externals turn off vt processing

* hopefully make work in non-windows environments

* clippy
2022-03-16 17:21:06 -05:00
Charles Dixon
1a16b9a2c4
Move repl loop and command/script execution to nu_cli (#4846)
* Refactor usage of is_perf_true to be a parameter passed around

* Move repl loop and command/script execution to nu_cli

* Move config setup out of nu_cli

* Update config_files.rs

* Update main.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-03-17 07:17:06 +13:00
JT
ff3dffd813
Nu glob (#4818)
* Fork glob. Normalise license holder

* Fix more licenses

* unwraps

* bad doc test
2022-03-13 11:30:27 -07:00
Fernando Herrera
5fcc670860
allow list to keybinding mode (#4821)
* allow list to keybinding mode

* added comments to default.nu
2022-03-12 11:51:08 +00:00
Fernando Herrera
7debb27d78
corrected history menu (#4814) 2022-03-10 20:58:11 +00:00
Justin Ma
ce690ed18f
Bump sysinfo version from v0.22.2 to v0.23.5, close #3909 (#4810) 2022-03-10 11:38:32 -05:00
JT
ffa3aaaa56
bump reedline (#4806) 2022-03-10 08:22:49 -05:00
Darren Schroeder
4ddf24269a
changed cargo.toml so plugins don't build with features=extra (#4788)
* changed cargo.toml so plugins don't build with features=extra

* remove comments
2022-03-08 20:05:58 -06:00
Fernando Herrera
cede9b3156
reedline bump (#4779) 2022-03-08 09:20:28 +00:00
Fernando Herrera
a3df2e5631
reedline bump (#4766)
* reedline bump

* reedline bump
2022-03-07 17:51:14 +00:00
Fernando Herrera
7701c6b1d4
added real index column to history (#4756) 2022-03-06 17:22:18 +00:00
JT
69fd777120
Bump reedline (#4747) 2022-03-05 19:55:37 -05:00
Genna Wingert
fa7d66347f
Add basic resource file for Windows binary (#4745) 2022-03-05 15:56:23 -06:00
Fernando Herrera
488f81d012
history bang (#4735)
* history bang

* change of char
2022-03-05 09:38:35 +00:00
Fernando Herrera
02dfb57ed1
partial completions bug (#4728) 2022-03-04 17:53:00 +00:00
Fernando Herrera
2fd42d25b1
partial completions (#4704) 2022-03-03 11:13:44 +02:00
JT
4965f4cbf4
Bump to 0.59.1 (#4689) 2022-03-01 16:55:51 -05:00
JT
2a89936bee
Move to latest stable crossterm, with fix (#4684) 2022-03-01 07:05:46 -05:00
Fernando Herrera
4ebbe07d27
Polars upgrade (#4665)
* polars upgrade

* Update describe.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-02-27 11:10:29 -05:00
Stefan Holderbach
799fa98411
Update reedline, revert crossterm (#4657)
At the moment `crossterm` apparently has a regression decoding certain important key combinations on Windows.
Thus reedline reverted to the previous version.

Some changes are necessary to remove the need for `crossterm` in the use of `lscolors`.
Introduces two local conversion traits.

Additionally update the `Highlighter` API to support the cursor
position.
This will enable brace/statement match highlighting.
2022-02-26 11:23:05 -06:00
JT
4b18fdcc6e
Date literals (#4619)
* Date literals

* update deps

* Add date+duration
2022-02-23 21:02:48 -05:00
JT
25712760ba
Add support for math-like externals (#4606) 2022-02-22 10:55:28 -05:00
Fernando Herrera
c2bad71123
remove repeated function (#4600)
* remove repeated function

* name in signature
2022-02-22 08:13:38 -05:00
JT
a96f8b891e
more strict nuon handling, better nuon errors (#4576)
* more strict nuon handling, better nuon errors

* Improve errors a bit more
2022-02-20 22:31:50 -05:00
Fernando Herrera
965cea3af5
flag to pass config file in nu (#4552)
* flag to pass config file in nu

* return when no folder is created

* simple syntax for function
2022-02-19 14:54:43 -06:00
Fernando Herrera
0f4f660759
better keybinding parsing (#4543) 2022-02-18 19:00:23 -06:00
Darren Schroeder
968ef1e953
add parameter to set thread count for parallel commands (#4424) 2022-02-11 12:46:36 -06:00
Darren Schroeder
f275644e13
add --perf cli param (#4391)
* add `--perf` cli param

* clippy

* fixed 2 `cp` tests on windows
2022-02-09 16:08:16 -06:00
JT
5d18e07b7d
Bump reedline (#4388) 2022-02-09 11:04:31 -05:00
JT
43850bf20e
Re-port filesystem commands (#4387)
* Re-port the filesystem commands

* Remove commented out section
2022-02-09 09:56:27 -05:00
JT
5fabfda57b merge main 2022-02-08 08:28:21 -05:00
JT
a660720b68
Bump to 0.44 (#4365) 2022-02-07 20:15:46 -05:00
JT
d70d91e559 Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
Fernando Herrera
fdce6c49ab engine-q merge 2022-02-07 19:11:34 +00:00
JT
3ab55f7de9
bump reedline (#970) 2022-02-07 07:40:17 -05:00
Fernando Herrera
796b7a1962
Reedline bump (#962)
* reedline bump

* reedline bump

* reedline bump
2022-02-06 18:18:32 +00:00