From a4f05a40e2f7146f429fef26a96c91a41baba499 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 11 Nov 2017 04:35:35 -0800 Subject: start adding help reference --- src/commands/help.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/commands/help.rs (limited to 'src/commands/help.rs') diff --git a/src/commands/help.rs b/src/commands/help.rs new file mode 100644 index 0000000..825447b --- /dev/null +++ b/src/commands/help.rs @@ -0,0 +1,17 @@ +use tw; +use ::Queryer; + +use tw::TweetId; + +use commands::Command; + +pub static HELP: Command = Command { + keyword: "help", + params: 0, + exec: help, + help_str: "This help prompt." +}; + +fn help(line: String, tweeter: &mut tw::TwitterCache, queryer: &mut Queryer) { + tweeter.state = tw::AppState::ShowHelp; +} -- cgit v1.1