Merge pull request #964 from progrium/963-mh-dont-allow-short-args-globally
only look for long args in global space. allows for short args in plugins. closes #963
This commit is contained in:
@@ -24,7 +24,8 @@ Dokku also supports certain command-line arguments that augment it's behavior. I
|
||||
in order to avoid ssh interpretting dokku arguments for itself.
|
||||
|
||||
```shell
|
||||
-q|--quiet suppress output headers
|
||||
-t|--trace enable DOKKU_TRACE for current execution only
|
||||
--quiet suppress output headers
|
||||
--trace enable DOKKU_TRACE for current execution only
|
||||
--rm|--rm-container remove docker container after successful dokku run <app> <command>
|
||||
--force force flag. currently used in apps:destroy
|
||||
```
|
||||
|
||||
4
dokku
4
dokku
@@ -19,7 +19,7 @@ source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
parse_args "$@"
|
||||
for arg in "$@"; do
|
||||
[[ "$arg" =~ ^-.* ]] && shift 1
|
||||
[[ "$arg" =~ ^--.* ]] && shift 1
|
||||
done
|
||||
! has_tty && DOKKU_QUIET_OUTPUT=1
|
||||
|
||||
@@ -150,7 +150,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
help|'')
|
||||
echo "Usage: dokku [-q|--quiet|-t|--trace|--rm-container|--rm] COMMAND <app> [command-specific-options]"
|
||||
echo "Usage: dokku [--quiet|--trace|--rm-container|--rm|--force] COMMAND <app> [command-specific-options]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
|
||||
|
||||
@@ -98,16 +98,16 @@ is_image_buildstep_based() {
|
||||
parse_args() {
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--quiet|-q)
|
||||
--quiet)
|
||||
export DOKKU_QUIET_OUTPUT=1
|
||||
;;
|
||||
--trace|-t)
|
||||
--trace)
|
||||
export DOKKU_TRACE=1
|
||||
;;
|
||||
--rm-container|--rm)
|
||||
export DOKKU_RM_CONTAINER=1
|
||||
;;
|
||||
--force|-f)
|
||||
--force)
|
||||
export DOKKU_APPS_FORCE_DELETE=1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user