Commit Graph

52 Commits

Author SHA1 Message Date
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
Stefan Holderbach
ec002a7ce8
Bump version for 0.19 release (#575) 2023-04-25 18:57:01 +02: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
Stefan Holderbach
35579194f7
Bump version for 0.17.0 release (#550)
Intended for nu 0.77
2023-03-13 23:29:33 +01:00
Stefan Holderbach
6a67d27e70
Update nu-ansi-term to 0.47.0 (#549)
See release notes:

https://github.com/nushell/nu-ansi-term/releases/tag/v0.47.0
2023-03-13 23:01:39 +01:00
Stefan Holderbach
0082cc39ae
Bump version for 0.16.0 release. (#542)
Expected to contain minor bugfix and work on `History::clear` API (work
to improve history metadata handling still in progress)
2023-02-20 22:22:06 +01:00
Stefan Holderbach
1801496be2
Bump rstest to 0.16 (#541)
https://github.com/la10736/rstest/blob/master/CHANGELOG.md
2023-02-19 19:24:09 +01:00
Stefan Holderbach
c658bea04f
Bump version for 0.15 release (#532)
Necessary for the `0.75` nushell release
2023-01-30 22:19:05 +01:00
Stefan Holderbach
a84601945e
Prepare the 0.14.0 release (#511) 2022-11-07 20:37:56 +01:00
Stefan Holderbach
21f5e125de
Prepare 0.13 release (#495) 2022-10-17 23:00:38 +02:00
Stefan Holderbach
f994cc9d38
Prepare 0.12.0 release (#487)
* Prepare 0.12.0 release

* Widen author metadata
2022-09-28 12:00:54 +13:00
Gregor
70118f732c
Basic external printer (#467)
Addresses #320, #236

* Adding External printer

* Made ExternalPrinter as an optional feature. Clippy is happy, test pass, docs added.

* ExternalPrinter: prints multiple messages if available, more on error-handling.

* Bug(s) fixed. Prints messages. Working example in examples folder. Code formatted, clippyed, tests pass.

* Generic ExternalPrinter<T> where T: Display.

* Fixed: Works with buffers larger than a line.

* Fixed: Works with buffers larger than a line, refactored.

* Different approach, seems to look like what is expected. Gives the "illusion" of one line being entered. Needs more testing, could have some off by one errors ;)

Co-authored-by: Gregor Engberding <gregor@meinkopter.de>
2022-09-14 21:58:45 +02:00
Stefan Holderbach
d636eefd64
Prepare 0.11.0 release (#471) 2022-09-06 10:54:16 +02:00
Stefan Holderbach
b11109bbe8
Prepare 0.10.0 release (#463) 2022-08-15 12:21:26 +02:00
Stefan Holderbach
f4aa6921b4
Reduce dev-deps by narrowing rstest features (#458)
`rstest = 0.12` added support for asynchronous timeouts during testing
thus requiring a larger set of dependencies. Since `rstest = 0.14` this
can be disabled if not used.

Should keep build times for local or CI tests in check.
2022-08-03 11:47:17 +02:00
Stefan Holderbach
a406bfc662
Update crossterm to 0.24 (#447)
This new crossterm version includes a breaking change to the indexing of
certain cursor move operations:

https://github.com/crossterm-rs/crossterm/releases/tag/0.24

While reedline itself might not be affected, check the code of the
consuming application that needs to match the crossterm version!
2022-07-28 23:09:32 +02:00
JT
a535eda62b
bump to 0.9 (#454) 2022-07-27 06:49:02 +12:00
Darren Schroeder
2e7483fe4d
update some deps (#453) 2022-07-25 20:32:57 -05:00
Stefan Holderbach
117f13b005
Prepare the 0.8.0 release (#448) 2022-07-05 10:38:36 +02:00
Eric Hodel
0680bb584a
Add vi WORD motions B, E, W (#441)
* Add vi W motion

This moves forward by WORD which is a sequence of non-blank characters
separated by whitespace.

* Add vi B motion

Support deleting backward for word (db) and WORD (dB)

* Add vi E motion
2022-06-16 11:58:19 +02:00
Stefan Holderbach
f14583526a
Prepare 0.7.0 release (#440)
Includes the new History API and their backends
2022-06-14 22:46:04 +02:00
phiresky
4f25ce5633
SQLite History and replaceable History backends (#401)
Changes the history API to support different storage backends and more rich information to be used as metadata/filtering criterions.

Includes a SQLite backed history with additional fields and ports the simple `FileBackedHistory` format consistent.

Includes a `HistoryCursor` to abstract the internal interactive browsing.
Updates `History` trait to cover the API to load and store to the storage backend. 

Commits

* basic sqlite history

* fix test compilation

* final touches for MVP

* better documentation

* fix for empty history

* partial change to non-generic history

* mostly working

* fix tests and ci

* fixes, format

* move history item to new file

* fix some comments, fix test compile errors

todo: fix tests

* ci features matrix

* fix index creation

* fix file-based tests

* move logic for not saving empty entries to engine

* fix update last command on empty, set up application_id and check version

* add specific error variants

* format

* fix compile errors

* fix fmt

* sqlite with bashisms

* hide with features

* cargo fmt

* improve performance of bashisms selectors

* Style: Remove commented out code

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
Co-authored-by: Fernando Herrera <fernando.j.herrera@gmail.com>
Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2022-06-06 18:11:02 +02:00
Stefan Holderbach
09bbb24bfd
Update nu-ansi-term and crate patches (#437)
- Update `nu-ansi-term` to remove `Deref` impl
- General `cargo update`
2022-06-03 21:11:59 +02:00
Stefan Holderbach
d8ff270f94
Prepare the v0.6.0 release (#430) 2022-05-23 23:59:07 +02:00
Stefan Holderbach
ef6499202a
Prepare the 0.5.0 release (#421)
`Cargo.toml` version bump
2022-05-03 21:16:00 +02:00
sholderbach
2176424cec
Finalize v0.4.0 2022-04-12 11:39:54 +02:00
Darren Schroeder
bc528de132
bump to 0.3.1 and nu-ansi-term to 0.45.1 (#361) 2022-03-27 15:42:39 +13:00
Stefan Holderbach
c0543b875c
Prepare for new release (#352)
- Update dependencies
- Increase version number to 0.3.0
2022-03-16 23:58:25 +01:00
JT
3d933d52ce
Better crossterm fix (#329)
* Move to crossterm on git

* Better fix for crossterm
2022-03-01 06:32:14 -05:00
JT
470b20129d
Move to crossterm on git (#328) 2022-03-01 05:41:23 -05:00
Stefan Holderbach
e314e8491e
Revert crossterm: key modifier issue on win (#326)
crossterm 0.23 seems to have introduce a regression on windows for
decoding keybindings with `ctrl` that uppercases the char.

Tracking issue crossterm-rs/crossterm#636

Might be fixed by crossterm-rs/crossterm#629
2022-02-26 14:51:38 +01:00
Stefan Holderbach
65cfd6bcbd
Bump dependencies and edition to 2021 (#310) 2022-02-24 00:09:58 +01:00
Stefan Holderbach
92b299916e
Make appending and truncating history file thread safe (#299)
Add safe `sync` method to `History`

This method both reads from the file and writes local additions. Is safe
when multiple `History` instances try to truncate the history file on
disk.

To avoid race conditions on the file uses the `fd_lock` crate for file
advisory locks. (Inspiration for that thanks to rustyline: https://github.com/kkawakam/rustyline/blob/master/src/history.rs)



Fixes #221

- Cover history file ops with tests
- Add test for conflicting writes that should truncate
- Add safe `sync` method to `History`
- Test `FileBackedHistory` for threadsafety
2022-02-06 00:20:44 +01:00
Darren Schroeder
a55884390e list things 2022-01-29 15:50:05 -06:00
Stefan Holderbach
2c24ff6140
Bump dependency versions (#232)
Make sure we are up to date on unicode crates et al.
2022-01-02 20:19:11 +01:00
Darren Schroeder
6884ec4062
add the ability to optionally turn off ansi coloring (#197)
* add the ability to optionally turn off ansi coloring

* also strip from the hinter
2021-12-09 21:48:08 +01:00
Stefan Holderbach
550ce9b486
Bump dependency versions (#177) 2021-11-08 10:49:30 +13:00
JT
93c2146fcf
Bump version (#152)
* Bump to 0.2

* Add to README

* Improve top docs

* Clear to the end of each newline to remove any leftovers
2021-09-24 07:40:32 +12:00
Sherub Thakur
30f9d419f3
Add tests to emacs and vi edit mode (#146)
* Add equality derive for EditCommand and ReedlineEvent

* Move matches to keybinds for emacs edit mode

* Simplify event matching in emacs edit mode

* Bugfix: All matches happening at same point

* Add failing test to check keybinding override

* Bugfix: Inserting capital character works

* Unknown requirement: test to be to capture currently unknown requirement

* Add rstest

The reason is to easily write parameterized tests

* Add test: for emoji input to emacs

* Add tests and fixes for vi edit mode

* Reedline None event and vi keybinds

* Keybindings are overridable

* Vi Reedline::None
2021-09-22 16:37:19 +12:00
JT
cd87851ad9
Cleanup some deps and improve build times (#144) 2021-09-06 05:39:19 +12:00
JT
ccce8d5fa1
Fix double chars (#140)
* Fix double chars

* Fix double chars

* Updates

* doctest fixes

* see if it's paying attention

* see if it's paying attention
2021-09-05 07:32:02 +12:00
Sherub Thakur
83ab5ddd6a
Add pretty_assertions lib (#73) 2021-06-24 06:07:58 +12:00
Darren Schroeder
0a224bef05
syntax highlighting fileio (#56)
* syntax highlighting fileio

* add an example syntax json file

* complied with jt's wishes because reasons :)
2021-06-16 08:02:29 +12:00
JT
e0714819e4
Add configurable keybindings (#51) 2021-06-11 12:08:09 +12:00
Stefan Holderbach
afd2c9526e
Basic API docs to give an overview of the current state (#47)
* Doctests for History

* Improve the general documentation of History.
* Doc tests to understand the API.
* Includes regression test to read back correctly from file.

* Run doctests in CI

* Minimal doc comments for Clipboard

* Basic API docs for the most important components

Still work in progress

* Add README and lib.rs docs

* Document more internals to help new contributors

* Doctest linebuffer

* Revert "Doctest linebuffer" for now

This reverts commit 08ff9c152c.

* Format run
2021-05-04 12:12:08 +02:00
Guillermo Lella
6c8ca05b4c
added OS's clipboard (#43)
Should work in Linux, macOS and Windows
2021-04-26 18:55:49 +12:00
Jonathan Turner
c376cefd3e
Begin multiline editing (#35) 2021-03-21 11:01:28 +13:00
Darren Schroeder
6ec4f86068
added a slightly-fancy prompt (#29) 2021-03-19 06:39:23 +13:00