mirror of https://github.com/xvxx/phetch
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
774 B
Rust
34 lines
774 B
Rust
/// The mode our text UI is in. Run mode is the default while
|
|
/// Print doesn't show the cursor, among other things.
|
|
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
|
pub enum Mode {
|
|
/// Default, interactive mode.
|
|
/// phetch URL
|
|
Run,
|
|
|
|
/// Just print a rendered version of a URL.
|
|
/// phetch --print URL
|
|
Print,
|
|
/// NoTTY, ie in a UNIX pipeline.
|
|
/// phetch --print URL | cat
|
|
NoTTY,
|
|
/// Just print raw Gopher response.
|
|
/// phetch --raw URL
|
|
Raw,
|
|
/// Show version info.
|
|
/// phetch --version
|
|
Version,
|
|
/// Show command line help.
|
|
/// phetch --help
|
|
Help,
|
|
/// Print current theme
|
|
/// phetch --theme
|
|
PrintTheme,
|
|
}
|
|
|
|
impl Default for Mode {
|
|
fn default() -> Self {
|
|
Mode::Run
|
|
}
|
|
}
|