diff --git a/crates/nu-cli/src/commands/history.rs b/crates/nu-cli/src/commands/history/history_.rs similarity index 99% rename from crates/nu-cli/src/commands/history.rs rename to crates/nu-cli/src/commands/history/history_.rs index 003185188..c4d15a954 100644 --- a/crates/nu-cli/src/commands/history.rs +++ b/crates/nu-cli/src/commands/history/history_.rs @@ -34,7 +34,7 @@ impl Command for History { "Show long listing of entries for sqlite history", Some('l'), ) - .category(Category::Misc) + .category(Category::History) } fn run( diff --git a/crates/nu-cli/src/commands/history_session.rs b/crates/nu-cli/src/commands/history/history_session.rs similarity index 96% rename from crates/nu-cli/src/commands/history_session.rs rename to crates/nu-cli/src/commands/history/history_session.rs index 5d08b4e7e..9f423f641 100644 --- a/crates/nu-cli/src/commands/history_session.rs +++ b/crates/nu-cli/src/commands/history/history_session.rs @@ -18,7 +18,7 @@ impl Command for HistorySession { fn signature(&self) -> nu_protocol::Signature { Signature::build("history session") - .category(Category::Misc) + .category(Category::History) .input_output_types(vec![(Type::Nothing, Type::Int)]) } diff --git a/crates/nu-cli/src/commands/history/mod.rs b/crates/nu-cli/src/commands/history/mod.rs new file mode 100644 index 000000000..be7d1fc11 --- /dev/null +++ b/crates/nu-cli/src/commands/history/mod.rs @@ -0,0 +1,5 @@ +mod history_; +mod history_session; + +pub use history_::History; +pub use history_session::HistorySession; diff --git a/crates/nu-cli/src/commands/mod.rs b/crates/nu-cli/src/commands/mod.rs index 00580ebaf..6089d7929 100644 --- a/crates/nu-cli/src/commands/mod.rs +++ b/crates/nu-cli/src/commands/mod.rs @@ -1,15 +1,13 @@ mod commandline; mod default_context; mod history; -mod history_session; mod keybindings; mod keybindings_default; mod keybindings_list; mod keybindings_listen; pub use commandline::Commandline; -pub use history::History; -pub use history_session::HistorySession; +pub use history::{History, HistorySession}; pub use keybindings::Keybindings; pub use keybindings_default::KeybindingsDefault; pub use keybindings_list::KeybindingsList; diff --git a/crates/nu-protocol/src/signature.rs b/crates/nu-protocol/src/signature.rs index e17f47c35..7e5b64b78 100644 --- a/crates/nu-protocol/src/signature.rs +++ b/crates/nu-protocol/src/signature.rs @@ -58,6 +58,7 @@ pub enum Category { Formats, Generators, Hash, + History, Math, Misc, Network, @@ -91,6 +92,7 @@ impl std::fmt::Display for Category { Category::Formats => "formats", Category::Generators => "generators", Category::Hash => "hash", + Category::History => "history", Category::Math => "math", Category::Misc => "misc", Category::Network => "network",