diff --git a/Cargo.toml b/Cargo.toml index 3c8d0ed4..481b3db5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,4 +56,5 @@ required-features = ["external_printer"] [package.metadata.docs.rs] # Whether to pass `--all-features` to Cargo (default: false) -all-features = true +all-features = false +features = ["bashisms", "external_printer", "sqlite"] diff --git a/src/edit_mode/vi/parser.rs b/src/edit_mode/vi/parser.rs index f243e53b..e04bd5a6 100644 --- a/src/edit_mode/vi/parser.rs +++ b/src/edit_mode/vi/parser.rs @@ -67,7 +67,7 @@ impl ParsedViSequence { /// /// ### Note: /// - /// https://github.com/vim/vim/blob/140f6d0eda7921f2f0b057ec38ed501240903fc3/runtime/doc/motion.txt#L64-L70 + /// fn total_multiplier(&self) -> usize { self.multiplier.unwrap_or(1) * self.count.unwrap_or(1) } diff --git a/src/engine.rs b/src/engine.rs index e4ca9c7e..43555eec 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -254,7 +254,7 @@ impl Reedline { /// You can check for that with [`crate::kitty_protocol_available`] /// `Reedline` will perform this check internally /// - /// Read more: https://sw.kovidgoyal.net/kitty/keyboard-protocol/ + /// Read more: pub fn use_kitty_keyboard_enhancement(mut self, enable: bool) -> Self { self.kitty_protocol.set(enable); self @@ -1697,6 +1697,9 @@ impl Reedline { } /// Adds an external printer + /// + /// ## Required feature: + /// `external_printer` #[cfg(feature = "external_printer")] pub fn with_external_printer(mut self, printer: ExternalPrinter) -> Self { self.external_printer = Some(printer); diff --git a/src/external_printer.rs b/src/external_printer.rs index c2cdf707..f4c71e7c 100644 --- a/src/external_printer.rs +++ b/src/external_printer.rs @@ -17,6 +17,9 @@ pub const EXTERNAL_PRINTER_DEFAULT_CAPACITY: usize = 20; /// An ExternalPrinter allows to print messages of text while editing a line. /// The message is printed as a new line, the line-edit will continue below the /// output. +/// +/// ## Required feature: +/// `external_printer` #[cfg(feature = "external_printer")] #[derive(Debug, Clone)] pub struct ExternalPrinter diff --git a/src/history/item.rs b/src/history/item.rs index 0c36fba3..d94af11b 100644 --- a/src/history/item.rs +++ b/src/history/item.rs @@ -98,8 +98,9 @@ pub struct HistoryItem { /// the exit status of the command pub exit_status: Option, /// arbitrary additional information that might be interesting - /// NOTE: this attribute is required because of https://github.com/rust-lang/rust/issues/41617 - /// (see https://github.com/serde-rs/serde/issues/1296#issuecomment-394056188 for the fix) + /// NOTE: this attribute is required because of + /// + /// (see for the fix) #[serde(deserialize_with = "Option::::deserialize")] pub more_info: Option, } diff --git a/src/history/sqlite_backed.rs b/src/history/sqlite_backed.rs index 7ab56e96..ec3b021a 100644 --- a/src/history/sqlite_backed.rs +++ b/src/history/sqlite_backed.rs @@ -14,6 +14,9 @@ const SQLITE_APPLICATION_ID: i32 = 1151497937; /// A history that stores the values to an SQLite database. /// In addition to storing the command, the history can store an additional arbitrary HistoryEntryContext, /// to add information such as a timestamp, running directory, result... +/// +/// ## Required feature: +/// `sqlite` or `sqlite-dynlib` pub struct SqliteBackedHistory { db: rusqlite::Connection, session: Option, diff --git a/src/terminal_extensions/bracketed_paste.rs b/src/terminal_extensions/bracketed_paste.rs index b6601cd8..81eea476 100644 --- a/src/terminal_extensions/bracketed_paste.rs +++ b/src/terminal_extensions/bracketed_paste.rs @@ -2,7 +2,7 @@ use crossterm::{event, execute}; /// Helper managing proper setup and teardown of bracketed paste mode /// -/// https://en.wikipedia.org/wiki/Bracketed-paste +/// #[derive(Default)] pub(crate) struct BracketedPasteGuard { enabled: bool, diff --git a/src/terminal_extensions/kitty.rs b/src/terminal_extensions/kitty.rs index e6bdd637..65fb6e34 100644 --- a/src/terminal_extensions/kitty.rs +++ b/src/terminal_extensions/kitty.rs @@ -11,7 +11,7 @@ use crossterm::{event, execute}; /// * [kakoune text editor](https://github.com/mawww/kakoune/issues/4103) /// * [dte text editor](https://gitlab.com/craigbarnes/dte/-/issues/138) /// -/// Refer to https://sw.kovidgoyal.net/kitty/keyboard-protocol/ if you're curious. +/// Refer to if you're curious. #[derive(Default)] pub(crate) struct KittyProtocolGuard { enabled: bool, diff --git a/src/terminal_extensions/mod.rs b/src/terminal_extensions/mod.rs index 927c96b5..b6f2dbeb 100644 --- a/src/terminal_extensions/mod.rs +++ b/src/terminal_extensions/mod.rs @@ -3,7 +3,7 @@ pub(crate) mod kitty; /// Return if the terminal supports the kitty keyboard enhancement protocol /// -/// Read more: https://sw.kovidgoyal.net/kitty/keyboard-protocol/ +/// Read more: /// /// SIDE EFFECT: Touches the terminal file descriptors pub fn kitty_protocol_available() -> bool {