Commit Graph

522 Commits

Author SHA1 Message Date
Hofer-Julian
f993939690
Improve history isolation (#634)
* Improve history isolation

After this change we will get rows:
- that have the same session_id, or
- have a lower id than the first command with our session_id, or
- if there's no command with our session_id, take the whole history.

* Enforce history_isolation also for hints

* Store the session_timestamp in `SqliteBackedHistory`
2023-09-17 15:45:38 -05:00
Stefan Holderbach
ebd653b840
Remove old actions-rs/cargo (#637)
See: https://github.com/actions-rs/toolchain/issues/216
2023-09-15 13:17:01 +02:00
Stefan Holderbach
ae1d97a384
Add a configuration to codecov.io (#636)
* Add a configuration to codecov.io

* Add badge

* Make coverage purely informational
2023-09-15 11:15:02 +02:00
Stefan Holderbach
6739c6aed4
Setup coverage with codecov.io (#635) 2023-09-15 10:43:07 +02:00
ysthakur
33828e5821
Add support for a different prompt after submission (#627)
adds a separate `transient_prompt` to be displayed after submitting.
2023-09-12 22:36:01 +02:00
Hofer-Julian
b2b8f3f486
Minor improvements (#633) 2023-09-10 11:31:32 +02:00
Hofer-Julian
409b51784f
Fix read_line docs (#629)
The result type is not `crossterm::Result` (anymore),
but `std::io::Result`
2023-09-01 22:31:19 +02:00
Stefan Holderbach
31257a4c54
Bump crossterm to 0.27.0 (#625)
* Bump `crossterm` to 0.27.0

Waiting for nushell as ratatui (used in nu-explore) is still on 0.26

* Cargo fmt

* Fix examples
2023-08-28 21:08:10 +02:00
Faïz Hernawan
6143b01b7b
Add Kitty protocol keyboard enhancement support (#607)
* add use_kitty_protocol support option

* move pop key enhancement flags just before loop exit

* add pop keyboard flags pop on drop

* remove toggler functions' return

* move pop key enhancement flags beside other mode change
2023-08-27 23:36:35 +02:00
Stefan Holderbach
a20c867f1c
Bump version for 0.23 release (#626)
Accompanies nushell 0.84.0
2023-08-20 22:57:15 +02:00
Darren Schroeder
e7ee24a2b0
update to strip-ansi-escapes 0.2.0 (#618) 2023-08-09 12:14:19 -05:00
Darren Schroeder
541698fb74
update strip-ansi-escapes to their latest api (#617) 2023-08-08 19:05:26 +02:00
Darren Schroeder
ed5e48e537
turn off default prompt styling (bold) to prevent leakage (#615) 2023-07-31 21:39:20 +02:00
Stefan Holderbach
0b9cb4718a
Bump version for 0.22 release (#614) 2023-07-24 21:14:01 +02:00
Stefan Holderbach
f15f0fb413
Bump nu-ansi-term to 0.49.0 (#613)
Side effect we don't duplicate `windows-sys` anymore
2023-07-24 12:35:05 +02:00
Stefan Holderbach
ddec668b92
Update the Cargo.lock for tests and demo (#611) 2023-07-20 23:47:26 +02:00
nibon7
e2543f0790
Fix big_word_left_index (#609)
* Fix big_word_left_index

* add one more test

---------

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2023-07-20 22:12:24 +02:00
Stefan Holderbach
12c6b7d3c7
Fix clippy lint for DoubleEndedIterator (#610) 2023-07-20 22:06:13 +02:00
Artemiy
4f31e200e4
Replace crossterm ScrollUp with universal workaround (#601)
Replace scrolling via escape sequence with workaround that prints newlines to retain scrollback
regardless of terminal implementation of scroll sequence
2023-07-12 14:30:25 +02:00
Stefan Holderbach
cf841beb92
Update (dev-)deps strum/pretty-assertions,rstest (#600)
- `strum`/`strum_macros` enables upgrade to `syn 2.0`
- `pretty-assertions` gets rid of `ctor` and other outdated dev-deps
- `rstest` also helps with `syn` but introduces `regex` dev-dep
2023-07-10 12:05:32 +02:00
nibon7
2142c5c8e9
Remove unneeded features of chrono (#599) 2023-06-29 17:04:21 +02:00
WindSoilder
d64df59757
always disable bracketed paste after read_line (#598) 2023-06-28 13:41:15 +02:00
Stefan Holderbach
c8bc5ac22b
Bump version for 0.21.0 release (#596) 2023-06-26 12:26:42 +02:00
WindSoilder
de2c627951
add a new disable_bracketed_paste method (#592)
* add a new disable_bracketed_paste function

* fix one typo
2023-06-09 15:11:19 -05:00
Darren Schroeder
cd793416b1
update .typos.toml for bui (#593) 2023-06-09 07:49:02 -05:00
Stefan Holderbach
3cb0feb094
Bump to 0.20.0 for release (#581) 2023-06-06 12:27:27 +02:00
Stefan Holderbach
78a81adf87
Revert removal of patch versions (#590)
Reincludes the patch versions that were removed in #586 to ensure
reedline gets built with a version with which we tested reedline at some
point.
2023-06-06 11:26:53 +02:00
WMR
79778f7b85
Update to make work with new lines embedded in sent string. (#588)
* Update to make work with new lines embedded in sent string.

* Appease fmt
2023-05-30 17:20:20 -05:00
Darren Schroeder
f7515b40e5
update cargo.lock (#587)
* update cargo.lock

* update timestamp_millis_opt
2023-05-26 08:58:50 -05:00
Darren Schroeder
8c4001b845
update dependencies (#586) 2023-05-26 08:26:42 -05:00
JT
e0e5957a5d
bump reedline version (#585) 2023-05-25 11:12:48 +12:00
IchHabeKeineNamen
bd306945b6
fix: prompt position on resize (#578)
* fix: prompt position on resize

* fix: u16 overflow

* fix: prompt position when terminal grows in height

* fix: exclude blank area from prompt height

fix: resume the early return to exclude a case where the terminal got smaller but the prompt is still visible

* fix: prevent any line overwriting at the cost of duplicate prompts

* fix: prevent width change from eating previous output
2023-05-25 11:07:44 +12:00
TrMen
7f54706cab
Allow binding of CTRL+ALT+<c>, CTRL+ALT+SHIFT+<c>, and <c> (#580)
Combinations like `Ctrl+Alt+a` could not be mapped previously, since
some non-us keyboard layouts use those combinations for sending
characters like `@`.

Now, first check if there a binding was defined using that combination,
else interpret as raw characters. This should not affect those special
keyboard layouts, since they would be sending `Ctrl+Alt+<special char>`,
rather than what would be on the US layout.

E.g.
- Map `Ctrl+Alt+a` to an action
- `Ctrl+Alt+a` on (some) german keyboards would send `@`
- A german layout pressing those keys would send a key combination of `Ctrl+Alt+@`,
  so they are unaffected by this change (they would have to specifically
  map `Ctrl+Alt+@`)
- For any layout actually sending `Ctrl+Alt+a`, they get the mapped action

This also allows the user to bind a keybinding without modifiers.

This affects emacs mode and vi insert mode (vi normal mode
already allows such keybindings).
2023-05-05 12:38:28 +02:00
samlich
97f754425a
History filter (#566)
* add `HistoryFilter` and use it in engine, to allow not storing items with a given prefix

* use `with_history_exclusion_prefix` in demo

* review

* impl history filter on engine

* keep 1 filterered history item

* don't impl History on Box<T: History>
2023-05-03 23:25:42 +02:00
WindSoilder
65c4e7a419
fix bracketed paste (#577) 2023-05-02 21:54:09 +02:00
Stefan Holderbach
ec002a7ce8
Bump version for 0.19 release (#575) 2023-04-25 18:57:01 +02:00
nibon7
86beb8793e
Restore the cursor shape when reedline exits (#574) 2023-04-24 20:08:24 +02:00
WindSoilder
3b60811f57
support bracketed paste (#571)
* support bracketed paste

* update demo

* fix clippy

* no need to enable bracketed paste, leave the behavior to user
2023-04-24 20:07:56 +02:00
Steven Xu
a366cf2926
feat: add current_insertion_point() to return the current insertion point of the input buffer (#573) 2023-04-23 06:30:28 -05:00
Justin
f6b23420e2
re-export crossterm::style::Color for custom prompt implementations (#569) 2023-04-18 07:14:16 -05:00
Darren Schroeder
61c6409fb7
Allow history searching via session id (#562)
* add the ability to search history with session id

* clippy
2023-04-18 07:13:49 -05:00
WindSoilder
27f4417191
Update crossterm to version 0.26.1 (#560)
* update crossterm to 0.26.1

* add event_listener_kitty_proto example

* add comment

* remove trait
2023-04-13 19:24:17 +02:00
Stefan Holderbach
89cb811838
Bump version for 0.18.0 release (#564)
for `nushell 0.78.0`
2023-04-03 23:32:06 +02:00
Darren Schroeder
9d6e22dd06
show the ability to have multiple modifiers (#559) 2023-03-23 07:07:27 -05:00
Jérémy Audiger
31743c8488
Add const to some new functions. (#555)
* Add const to some new functions.

* Add const to SearchFilter builders.

* Add const to SearchQuery builders.
2023-03-22 19:23:44 +01:00
Ryan Whitehouse
781e73a2be
Allow multi byte characters as the marker without panicking (#553)
* Allow multi byte characters as the marker without panicking

* Clean up tests and add one for the remainder

* Remove extra whitespace

* Add missing feature toggle

* Clean up tests
2023-03-21 12:43:17 +01:00
Hofer-Julian
f75afbdeba
Check typos in CI (#557) 2023-03-19 20:07:29 +01:00
Jérémy Audiger
af7b447a06
Set MSRV to 1.62.1 (#554)
* Set MSRV to 1.62.1

* Update gitignore file to harmonize it.
2023-03-17 18:46:43 +01:00
micron-mushroom
5ba547cf51
fix: singlebyte char assumption in parse_selection_char (#548)
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
2023-03-15 18:30:40 +01:00
Clément Nerma
3c010ccd34
Make Event public to allow implements custom EditMode (#552) 2023-03-15 18:28:00 +01:00