shrs/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
#![doc(html_root_url = "https://docs.rs/shrs/0.0.6")]
//! **shrs** is a framework for building and configuring your own shell in rust.
//!
//! # Example
//! The most basic shell can be created very easily:
//! ```no_run
//! use shrs::prelude::*;
//!
//! fn main() {
//! let myshell = ShellBuilder::default()
//! .build()
//! .unwrap();
//!
//! myshell.run().unwrap();
//! }
//! ```
//! For more advanced explanation on features and configuration options, see the [shrs book](mrpicklepinosaur.github.io/shrs/)
//!
extern crate derive_builder;
pub use shrs_core::*;
pub mod lang {
//! Shell command language
pub use shrs_core::lang::*;
pub use shrs_lang::*;
}
pub mod crossterm {
//! Re-export of crossterm types
pub use crossterm::{
style::{Attribute, Color, Print, Stylize},
QueueableCommand,
};
}
pub mod anyhow {
//! Re-export of anyhow crate for error handling
pub use anyhow::{anyhow, Error, Result, *};
}
pub mod prelude {
//! `use shrs::prelude::*` to import most commonly used structs and functions
pub use shrs_core::prelude::*;
pub use shrs_utils::*;
#[allow(unused_imports)]
pub use crate::{anyhow, crossterm, crossterm::*, plugin::*, readline::*, shell::*};
}