extern crate gauge_rs;

use std::env;

fn help() {
    println!("Rust language runner for Gauge. Version: {}",
             gauge_rs::version());
    println!("\nAvailable commands:");
    println!(" --init    - Create a new Gauge project with Rust language runner in the current \
              directory");
    println!(" --run     - Run the plugin. Needs to be invoked from Gauge");
    println!(" --version - Show plugin version");
    println!(" --help    - Show this help message");
}

fn print_version() {
    println!("{}", gauge_rs::version().trim_matches('"'));
}

fn main() {
    if let Some(arg) = env::args().nth(1) {
        match arg.as_ref() {
            "--run" => gauge_rs::runner::run(),
            "--init" => gauge_rs::install::init(),
            "--version" => print_version(),
            _ => help(),
        }
    } else {
        help()
    }
}

extern crate gauge_rs;

use std::env;

fn help() {
    println!("Rust language runner for Gauge. Version: {}",
             gauge_rs::version());
    println!("\nAvailable commands:");
    println!(" --init - Create a new Gauge project with Rust language runner in the current \
              directory");
    println!(" --run  - Run the plugin. Needs to be invoked from Gauge");
    println!(" --help - Show this help message");
}

fn main() {
    if let Some(arg) = env::args().nth(1) {
        match arg.as_ref() {
            "--run" => gauge_rs::runner::run(),
            "--init" => gauge_rs::install::init(),
            _ => help(),
        }
    } else {
        help()
    }
}

--- 
+++ 
@@ -6,10 +6,15 @@
     println!("Rust language runner for Gauge. Version: {}",
              gauge_rs::version());
     println!("\nAvailable commands:");
-    println!(" --init - Create a new Gauge project with Rust language runner in the current \
+    println!(" --init    - Create a new Gauge project with Rust language runner in the current \
               directory");
-    println!(" --run  - Run the plugin. Needs to be invoked from Gauge");
-    println!(" --help - Show this help message");
+    println!(" --run     - Run the plugin. Needs to be invoked from Gauge");
+    println!(" --version - Show plugin version");
+    println!(" --help    - Show this help message");
+}
+
+fn print_version() {
+    println!("{}", gauge_rs::version().trim_matches('"'));
 }
 
 fn main() {
@@ -17,6 +22,7 @@
         match arg.as_ref() {
             "--run" => gauge_rs::runner::run(),
             "--init" => gauge_rs::install::init(),
+            "--version" => print_version(),
             _ => help(),
         }
     } else {
Add support to print --version

Signed-off-by: Kaustav Das Modak <ba1ce5b1e09413a89404909d8d270942c5dadd14@yahoo.co.in>
