diff --git a/src/colloquy/Cargo.toml b/src/colloquy/Cargo.toml index 12f5e7e8f..ca1fd21e6 100644 --- a/src/colloquy/Cargo.toml +++ b/src/colloquy/Cargo.toml @@ -10,4 +10,8 @@ homepage = "https://nick-black.com/dankwiki/index.php/Notcurses" [dependencies] notcurses = ">= 1.2.3" -clap = {version = ">= 2.33.0", features = ["yaml", "color", "suggestions"]} + +[dependencies.clap] +version = ">= 2.33.0" +default-features = false +features = ["yaml", "color", "suggestions"] diff --git a/src/colloquy/src/cli.yml b/src/colloquy/src/cli.yml index 11bd18641..6d35e71a6 100644 --- a/src/colloquy/src/cli.yml +++ b/src/colloquy/src/cli.yml @@ -1,17 +1,17 @@ name: colloquy version: "0.1.0" -about: Attractive UI widgets from the shell +about: Attractive Notcurses UI widgets from the shell author: Nick Black args: - verbose: long: verbose short: v help: Verbose mode - - file: - long: file - short: f - help: Read configuration options from this file - takes_value: true +# - file: +# long: file +# short: f +# help: Read configuration options from this file +# takes_value: true - title: long: title short: t @@ -19,15 +19,13 @@ args: - msgbox: long: msgbox help: Display arbitrary text with a single button to accept it + requires: text - text: help: The contents of the widget - required: true index: 1 - height: help: The height of the widget, 0 for screen height - required: true index: 2 - width: help: The width of the widget, 0 for screen width - required: true index: 3 diff --git a/src/colloquy/src/main.rs b/src/colloquy/src/main.rs index 5413be7e8..48793314f 100644 --- a/src/colloquy/src/main.rs +++ b/src/colloquy/src/main.rs @@ -2,4 +2,10 @@ fn main() { use clap::{load_yaml, App}; let yaml = load_yaml!("cli.yml"); let matches = App::from_yaml(yaml).get_matches(); + if matches.is_present("msgbox") { + // do a messagebox + }else{ + eprintln!("Needed a widget type"); + std::process::exit(1); + } }