refactor: unify command declaration across codebase

This commit is contained in:
Jose Diaz-Gonzalez
2020-02-10 01:40:30 -05:00
parent b0abeb49dd
commit e67b96780d
108 changed files with 475 additions and 315 deletions

View File

@@ -235,8 +235,8 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
cmd-hello-default() {
declare desc="prints Hello \$APP"
declare cmd="hello" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
declare cmd="hello"
[[ "$1" == "$cmd" ]] && shift 1
# Support --app/$DOKKU_APP_NAME flag
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
[[ -n $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
@@ -263,8 +263,8 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
cmd-hello-world() {
declare desc="prints Hello world"
declare cmd="hello:world" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
declare cmd="hello:world"
[[ "$1" == "$cmd" ]] && shift 1
echo "Hello world"
}