forked from extern/nushell
@ -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