summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Oram <mitmaro@gmail.com>2017-12-29 15:21:42 -0330
committerTim Oram <mitmaro@gmail.com>2017-12-29 15:25:42 -0330
commit663b81a133c8c30823f726791afa201073db15ec (patch)
tree4ca82d21affe8c3c75da920b4d0371fe8e73cb25 /src
parent7530a7154836231e3edefa17cbcc7aa46c33ea08 (diff)
Added version option
Diffstat (limited to 'src')
-rw-r--r--src/main.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 918cc95..2bc1e02 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,9 +24,16 @@ use git_interactive::GitInteractive;
use window::Window;
fn main() {
-
let filepath = match env::args().nth(1) {
- Some(filepath) => filepath,
+ Some(arg) => {
+ match arg.as_ref() {
+ "--version" | "-v" => {
+ println!("v0.5.0");
+ process::exit(0);
+ },
+ _ => arg
+ }
+ },
None => {
eprintln!(
"Must provide a filepath.\n\n\