Commit Graph

5235 Commits

Author SHA1 Message Date
Herlon Aguiar
13869e7d52
nu-cli: refactor completions (#5102) 2022-04-06 19:58:55 +12:00
JT
121a4f06fb
Load plugins for scripts and commands, too (#5105) 2022-04-06 19:45:26 +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
Hofer-Julian
d6dd4078b1
Remove enqine-q from issue template (#5075)
The notice is not necessary anymore since engine-q is merged now
2022-04-03 06:52:42 -05:00
JT
6649da3f5d
Add support for single value row conditions (#5072) 2022-04-03 10:41:36 +12:00
Michael Angerman
62901573d0
update the readme in the docs folder (#5065)
* update docs/Readme

* tweak readme
2022-04-01 13:48:09 -07: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
Matteo Bertini
a2872b4ccc
Strip '+ ' decoration in git branch list (#5016)
- '+' is the prefix for the current branch in some worktree

Closes #5014
2022-03-28 16:07:55 -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
Fernando Herrera
e934062542
corrects menu selection (#5004) 2022-03-28 20:43:27 +13: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
Jakub Žádník
047081fa72
Add a README about changing capnp schema (#4998)
* Add a README about changing schema

* Add example PRs
2022-03-27 19:02:19 -05:00
Reilly Wood
5586d4a0a0
did_you_mean: case-insensitive edit distance, tests (#4999) 2022-03-27 17:11:56 -05:00
JT
911fba8a8a
Help menu improvements (#4997)
* Help menu improvements

* default config
2022-03-27 15:21:40 -05:00