Refactored the feature, release and support subcommands, too.
diff --git a/git-flow-support b/git-flow-support
index d855eaa..adb336d 100644
--- a/git-flow-support
+++ b/git-flow-support
@@ -13,7 +13,8 @@
#
usage() {
- echo "usage: git flow start support <version> [<base>]"
+ echo "usage: git flow support"
+ echo " git flow support start <version> [<base>]"
}
parse_args() {
@@ -29,6 +30,17 @@
BRANCH=$PREFIX$VERSION
}
+cmd_default() {
+ # TODO: Refactor getting this prefix into a general function
+ PREFIX=$(git config --get gitflow.prefix.support || echo support/)
+ SUPPORT_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
+ if [ -z "$SUPPORT_BRANCHES" ]; then
+ warn "No support branches exist."
+ exit 0
+ fi
+ echo "$SUPPORT_BRANCHES" | sed "s?^$PREFIX??g"
+}
+
cmd_help() {
usage
exit 0