Commit Graph

2620 Commits

Author SHA1 Message Date
Reilly Wood
b2c52b51b7
Change string contains operators to regex (#5117) 2022-04-07 18:23:14 +12:00
JT
888369022f
Add datetime to math-like (#5118)
* Add datetime to math-like

* add test
2022-04-07 18:02:28 +12:00
JT
4409185e1b
Improve describe to be more accurate (#5116) 2022-04-07 16:34:09 +12:00
JT
ef1934a7ee
Remove external name exceptions (#5115) 2022-04-07 14:01:31 +12:00
JT
591fb4bd36
Add unary not (#5111) 2022-04-07 07:10:25 +12:00
Jakub Žádník
12d3e4e424
Add env.nu file for environment config (#5099)
* Add env.nu file for environment config

* Add missing flag

* Add $nu.env-path variable

Prints `env.nu` path

* Add example of adding entries to PATH
2022-04-07 05:11:51 +12:00
Herlon Aguiar
c3bed1352a
nu-cli/completions: prioritize non hidden folders (#5108) 2022-04-06 16:56:43 +01:00
Fernando Herrera
3ceb39c82c
use arc to avoid cloning entire engine for menus (#5104)
* use arc to avoid cloning entire engine for menus

* remove complete import path

* remove stack clone

* reference in completer
2022-04-06 13:25:02 +01:00
Herlon Aguiar
13869e7d52
nu-cli: refactor completions (#5102) 2022-04-06 19:58:55 +12:00
Reilly Wood
d0e636ae7a
Trim newline from input results (#5097) 2022-04-05 12:52:09 -05:00
Darren Schroeder
6e7e2dbb97
enables find to search records with regex (#5100)
* enables find to search records with regex

* clippy
2022-04-05 12:26:11 -05:00
Reilly Wood
d64cf1687e
Fix Format for non-basic data types (#5095) 2022-04-05 07:45:38 -05:00
Reilly Wood
657b631fdc
Add search terms to many commands (#5096) 2022-04-05 07:01:21 -05:00
Fernando Herrera
fa6ed7a40b
allow record as text style (#5092) 2022-04-04 22:36:48 +01: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
JT
abe028f930
Add raw strings, use raw strings for env (#5090) 2022-04-05 08:42:26 +12:00
Herlon Aguiar
ef1cf7e634
feature: Add some context to completions (#5078)
* send current line and position

* copy current line

* fix error

* deleted test completion
2022-04-05 06:31:40 +12:00
Elijah Koreman
1e4b33b9c6
Add quiet and feedback to mv command (#5073)
* Add quiet and feedback to mv command

* replaced filter and map with filter_map
2022-04-05 06:30:51 +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
Reilly Wood
a86e6ce89b
Set LAST_EXIT_CODE on parse error (#5084) 2022-04-04 06:11:27 -05:00
Reilly Wood
c4cfbaec2d
Fix Python plugin (missing search terms) (#5083)
* Add search_terms to Python plugin

* Clean up Python plugin comments
2022-04-03 20:00:53 -05:00
Reilly Wood
d40109f210
Tweak append+prepend help (#5080) 2022-04-03 17:50:22 -05:00
Reilly Wood
20be8a4987
Fix for search terms in help --find (#5081)
* Fix search terms in help --find

* Update help --find description
2022-04-03 17:37:22 -05:00
JT
6649da3f5d
Add support for single value row conditions (#5072) 2022-04-03 10:41:36 +12:00
JT
80c9888f82
Add command descriptions to completions (#5063) 2022-04-02 08:18:11 +13:00
Simon Goller
19c3570cf9
Allow open to work with 'from ...' block commands (#5049)
* Remove panic from BlockCommands run function

Instead of panicing, the run method now returns an error to prevent
nushell from unexpected termination.

* Add ability to open command to run with blocks

The open command tries to parse the content of the file
if there is a command called 'from (file ending)'.  This works
fine if the command was 'built in' because the run method doesn't
fail in this case.  It did fail on a BlockCommand, though.

This change will first probe if the command contains a block and
evaluate it, if this is the case.  If there is no block, it will run
the command the same way as before.

* Add test open files with BlockCommands

* Update open.rs

* Adjust file type on open with BlockCommand parser

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-04-02 07:52:32 +13:00
Darren Schroeder
2cb815b7b4
Add starts with operator (#5061)
* add starts_with operator

* added a test
2022-04-01 13:35:46 -05:00
Fernando Herrera
a088081695
update reedline (#5062) 2022-04-01 19:22:40 +01:00
JT
4bb95a880f
let a simple last be a single value (#5060) 2022-04-01 23:12:31 +13:00
JT
9beecff736
Add 'date to-record' (#5058) 2022-04-01 21:09:30 +13:00
JT
fa0400c3f2
Fix sort signature (#5055) 2022-04-01 13:03:07 +13:00
JT
1d2d31580b
Allow strings for prompt env vars (#5052) 2022-04-01 12:00:50 +13:00
JT
834f993547
Sort command (#5054) 2022-04-01 11:43:16 +13:00
Stefan Holderbach
2193910579
Update reedline to new constructor API (#5051) 2022-04-01 11:16:28 +13:00
Reilly Wood
f692da487e
Fix load-env unsupported input error message (#5039) 2022-04-01 10:59:04 +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
msp
6a6471b04b
feat: add --suppress-output (-s) to input command (#5017)
* feat: add --suppress-output (-s) to input command

* Don't handle cursor position since existing impl doesn't

* Handle all raw mode outcomes
2022-03-31 14:20:31 -05:00
Darren Schroeder
05f7d7d38b
finish hooking up completion descriptions (#5047) 2022-03-31 11:13:16 -05:00
Jakub Žádník
d89ad4fafd
Add record, list, and table to signature types (#5040) 2022-03-31 11:11:03 +03:00
Fernando Herrera
385bc40627
evaluate indicators as commands (#5026)
* evaluate indicators are commands

* default strings in config

* default multiline

* removed build string command
2022-03-31 06:22:55 +01:00
Reilly Wood
e2d24c5956
Fix which-support feature (#5038) 2022-03-30 13:37:31 -05:00
Michael Angerman
82633e2df7
update nu-glob README (#5037) 2022-03-30 10:44:23 -07:00
Reilly Wood
31a4fc41eb
Fix env var shorthand when value contains = (#5022) 2022-03-30 09:56:55 +13:00
Reilly Wood
79182db587
Clean up which/which-support Cargo feature (#5019)
* Rename "which" feature to "which-support"

* Ignore currently broken environment tests
2022-03-29 06:10:43 -05:00
JT
0afa18ac4a
Use real stack during custom completion (#5010) 2022-03-29 06:49:41 +13:00
Richard Wang
1aef3a730a
fix: pass metadata to more filter commands for ls_colors (#5009)
* fix(filters): pass metadata for select

* fix(filters): pass metadata for group, window

* fix(filters): pass metadata for each, every

* fix(filters): pass metadata for collect, compact, flatten

* fix(filters): pass metadata for get

* fix: get rid of necessary `.clone()``

* style: rename closure call to be consistent w/ others

* fix(filters): pass metadata for par-each, prepend

* fix(filters): pass metadata for range

* fix(filters): pass metadata for reject

* fix(filters): pass metadata for more commands

* style: run cargo fmt
2022-03-28 06:43:09 -05:00
JT
2e3b74f1b2
Fix for loop ctrlc not terminating (#5003) 2022-03-28 19:13:43 +13:00
JT
a87f53072a
See if levenshtein sorting feels goofor completions (#5001) 2022-03-28 13:31:31 +13:00