mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 17:05:03 +02:00
@ -445,7 +445,7 @@ fn build_ansi_hashmap(v: &'static [AnsiCode]) -> HashMap<&'static str, &'static
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::AnsiCommand;
|
||||
use crate::platform::ansi::ansi_::AnsiCommand;
|
||||
|
||||
#[test]
|
||||
fn examples_work_as_expected() {
|
@ -1,7 +1,7 @@
|
||||
mod command;
|
||||
mod ansi_;
|
||||
mod gradient;
|
||||
mod strip;
|
||||
|
||||
pub use command::AnsiCommand as Ansi;
|
||||
pub use ansi_::AnsiCommand as Ansi;
|
||||
pub use gradient::SubCommand as AnsiGradient;
|
||||
pub use strip::SubCommand as AnsiStrip;
|
||||
|
@ -14,6 +14,6 @@ pub use dir_info::{DirBuilder, DirInfo, FileInfo};
|
||||
pub use du::Du;
|
||||
pub use input::Input;
|
||||
pub use kill::Kill;
|
||||
pub use reedline_commands::{DefaultKeybindings, InputKeys, Keybindings, ListKeybindings};
|
||||
pub use reedline_commands::{Keybindings, KeybindingsDefault, KeybindingsList, KeybindingsListen};
|
||||
pub use sleep::Sleep;
|
||||
pub use term_size::TermSize;
|
||||
|
@ -6,9 +6,9 @@ use nu_protocol::{
|
||||
use reedline::get_reedline_default_keybindings;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct DefaultKeybindings;
|
||||
pub struct KeybindingsDefault;
|
||||
|
||||
impl Command for DefaultKeybindings {
|
||||
impl Command for KeybindingsDefault {
|
||||
fn name(&self) -> &str {
|
||||
"keybindings default"
|
||||
}
|
@ -9,9 +9,9 @@ use reedline::{
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ListKeybindings;
|
||||
pub struct KeybindingsList;
|
||||
|
||||
impl Command for ListKeybindings {
|
||||
impl Command for KeybindingsList {
|
||||
fn name(&self) -> &str {
|
||||
"keybindings list"
|
||||
}
|
@ -8,9 +8,9 @@ use nu_protocol::{
|
||||
use std::io::{stdout, Write};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct InputKeys;
|
||||
pub struct KeybindingsListen;
|
||||
|
||||
impl Command for InputKeys {
|
||||
impl Command for KeybindingsListen {
|
||||
fn name(&self) -> &str {
|
||||
"keybindings listen"
|
||||
}
|
||||
@ -141,11 +141,11 @@ fn print_events_helper(event: Event) -> Result<Value, ShellError> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::InputKeys;
|
||||
use crate::KeybindingsListen;
|
||||
|
||||
#[test]
|
||||
fn examples_work_as_expected() {
|
||||
use crate::test_examples;
|
||||
test_examples(InputKeys {})
|
||||
test_examples(KeybindingsListen {})
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
mod command;
|
||||
mod default_keybindings;
|
||||
mod input_keys;
|
||||
mod list_keybindings;
|
||||
mod keybindings;
|
||||
mod keybindings_default;
|
||||
mod keybindings_list;
|
||||
mod keybindings_listen;
|
||||
|
||||
pub use command::Keybindings;
|
||||
pub use default_keybindings::DefaultKeybindings;
|
||||
pub use input_keys::InputKeys;
|
||||
pub use list_keybindings::ListKeybindings;
|
||||
pub use keybindings::Keybindings;
|
||||
pub use keybindings_default::KeybindingsDefault;
|
||||
pub use keybindings_list::KeybindingsList;
|
||||
pub use keybindings_listen::KeybindingsListen;
|
||||
|
Reference in New Issue
Block a user