From 7df428fa7e2ab5f5f3f9948583d01930e3801d0e Mon Sep 17 00:00:00 2001 From: rkiel Date: Tue, 2 Jun 2015 22:40:06 -0400 Subject: [PATCH] added a new default --- bin/feature | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/feature b/bin/feature index 7cbe3ea..596d6d3 100755 --- a/bin/feature +++ b/bin/feature @@ -50,6 +50,12 @@ class Base end end +class Branch < Base + def execute + run_cmd "git branch" + end +end + class Rebase < Base def execute parts = parse_branch(current_branch) @@ -140,14 +146,14 @@ class End < Base end -error "USAGE: feature cmd branch" unless ARGV.size > 0 command = case ARGV[0] when "start" then Start.new(ARGV) when "end" then End.new(ARGV) when "rebase" then Rebase.new(ARGV) when "merge" then MergeTo.new(ARGV) - else error "invalid cmd: #{ARGV[0]}" + when nil then Branch.new(ARGV) + else error "USAGE: feature cmd branch" end command.execute