mirror of
https://github.com/nushell/nushell.git
synced 2024-11-07 17:14:23 +01:00
Move history into their own module (#11308)
# Description Since there are plans to add more history commands, it seems sensible to put them into their own module and category https://github.com/nushell/nushell/pull/10440#issuecomment-1731408785 # User-Facing Changes The history commands are in the category "History" rather than "Misc"
This commit is contained in:
parent
156232fe08
commit
50102bf69b
@ -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(
|
@ -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)])
|
||||
}
|
||||
|
5
crates/nu-cli/src/commands/history/mod.rs
Normal file
5
crates/nu-cli/src/commands/history/mod.rs
Normal file
@ -0,0 +1,5 @@
|
||||
mod history_;
|
||||
mod history_session;
|
||||
|
||||
pub use history_::History;
|
||||
pub use history_session::HistorySession;
|
@ -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;
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user