diff --git a/Cargo.toml b/Cargo.toml index a1c4e9c..4bc4516 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ strip-ansi-escapes = "0.1.1" strum = "0.24" strum_macros = "0.24" fd-lock = "3.0.3" -rusqlite = { version = "0.28.0", optional = true, features = ["bundled"] } +rusqlite = { version = "0.28.0", optional = true } serde_json = { version = "1.0.79", optional = true } gethostname = { version = "0.2.3", optional = true } thiserror = "1.0.31" @@ -42,5 +42,7 @@ rstest = { version = "0.15.0", default-features = false } [features] system_clipboard = ["clipboard"] bashisms = [] -sqlite = ["rusqlite", "serde_json", "gethostname"] external_printer = ["crossbeam"] +sqlite = ["rusqlite/bundled", "serde_json", "gethostname"] +sqlite-dynlib = ["rusqlite", "serde_json", "gethostname"] + diff --git a/README.md b/README.md index d5c34b6..2081ba2 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ It is currently primarily developed as the interactive editor for [nushell](http - [Integrate with `Hinter` for fish-style history autosuggestions](#integrate-with-hinter-for-fish-style-history-autosuggestions) - [Integrate with custom line completion `Validator`](#integrate-with-custom-line-completion-validator) - [Use custom `EditMode`](#use-custom-editmode) +- [Crate features](#crate-features) - [Are we prompt yet? (Development status)](#are-we-prompt-yet-development-status) - [Contributing](./CONTRIBUTING.md) - [Alternatives](#alternatives) @@ -182,6 +183,14 @@ let mut line_editor = Reedline::create().with_edit_mode(Box::new(Vi::new( ))); ``` +## Crate features + +- `clipboard`: Enable support to use the `SystemClipboard`. Enabling this feature will return a `SystemClipboard` instead of a local clipboard when calling `get_default_clipboard()`. +- `bashisms`: Enable support for special text sequences that recall components from the history. e.g. `!!` and `!$`. For use in shells like `bash` or [`nushell`](https://nushell.sh). +- `sqlite`: Provides the `SqliteBackedHistory` to store richer information in the history. Statically links the required sqlite version. +- `sqlite-dynlib`: Alternative to the feature `sqlite`. Will not statically link. Requires `sqlite >= 3.38` to link dynamically! +- `external_printer`: **Experimental:** Thread-safe `ExternalPrinter` handle to print lines from concurrently running threads. + ## Are we prompt yet? (Development status) Reedline has now all the basic features to become the primary line editor for [nushell](https://github.com/nushell/nushell diff --git a/src/lib.rs b/src/lib.rs index 9c16226..8c946db 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -161,6 +161,14 @@ //! ))); //! ``` //! +//! ## Crate features +//! +//! - `clipboard`: Enable support to use the `SystemClipboard`. Enabling this feature will return a `SystemClipboard` instead of a local clipboard when calling `get_default_clipboard()`. +//! - `bashisms`: Enable support for special text sequences that recall components from the history. e.g. `!!` and `!$`. For use in shells like `bash` or [`nushell`](https://nushell.sh). +//! - `sqlite`: Provides the `SqliteBackedHistory` to store richer information in the history. Statically links the required sqlite version. +//! - `sqlite-dynlib`: Alternative to the feature `sqlite`. Will not statically link. Requires `sqlite >= 3.38` to link dynamically! +//! - `external_printer`: **Experimental:** Thread-safe `ExternalPrinter` handle to print lines from concurrently running threads. +//! //! ## Are we prompt yet? (Development status) //! //! Nushell has now all the basic features to become the primary line editor for [nushell](https://github.com/nushell/nushell