From 0ef276d40b30cfb7447c4bff840384c0066d61b9 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 20 Nov 2025 03:11:49 -0500 Subject: [PATCH 1/2] feat: add aliases for select builder and scheduler plugins It can get repetitive to specify 'builder-' or 'scheduler-' prefixes for builder and scheduler commands. As these are mostly unique, Dokku now provides built-in aliases for the commands. Dokku still uses the long-form in all it's documentation, but these are a nice easter egg for determined users :) Note that the null builder/scheduler plugins do not have aliases as they would shadow each other. --- dokku | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/dokku b/dokku index cd8a381a4..879e0e0cd 100755 --- a/dokku +++ b/dokku @@ -135,6 +135,28 @@ execute_dokku_cmd() { local script local argv=("$@") + local -A PLUGIN_ALIASES=( + [docker-local]="scheduler-docker-local" + [dockerfile]="builder-dockerfile" + [herokuish]="builder-herokuish" + [k3s]="scheduler-k3s" + [lambda]="builder-lambda" + [nixpacks]="builder-nixpacks" + [pack]="builder-pack" + [rails]="builder-railpack" + ) + + local plugin_alias_source="${PLUGIN_NAME%%:*}" + local plugin_alias_target="${PLUGIN_ALIASES[$plugin_alias_source]}" + if [[ -n "$plugin_alias_target" ]]; then + PLUGIN_NAME="${PLUGIN_NAME/$plugin_alias_source/$plugin_alias_target}" + PLUGIN_CMD="${PLUGIN_CMD/$plugin_alias_source/$plugin_alias_target}" + # also replace the first argument in $@ with the new PLUGIN_NAME + shift 1 + set -- "$PLUGIN_NAME" "$@" + argv=("$PLUGIN_NAME" "${argv[@]:1}") + fi + case "$PLUGIN_NAME" in events | events:*) local PLUGIN_NAME=${PLUGIN_NAME/events/20_events} From f6b97100ea14f9f48823db54ce886c7ec12eeaa5 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 20 Nov 2025 04:29:41 -0500 Subject: [PATCH 2/2] fix: correct lint issue --- dokku | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/dokku b/dokku index 879e0e0cd..60caaa6e2 100755 --- a/dokku +++ b/dokku @@ -135,16 +135,15 @@ execute_dokku_cmd() { local script local argv=("$@") - local -A PLUGIN_ALIASES=( - [docker-local]="scheduler-docker-local" - [dockerfile]="builder-dockerfile" - [herokuish]="builder-herokuish" - [k3s]="scheduler-k3s" - [lambda]="builder-lambda" - [nixpacks]="builder-nixpacks" - [pack]="builder-pack" - [rails]="builder-railpack" - ) + local -A PLUGIN_ALIASES + PLUGIN_ALIASES["docker-local"]="scheduler-docker-local" + PLUGIN_ALIASES["dockerfile"]="builder-dockerfile" + PLUGIN_ALIASES["herokuish"]="builder-herokuish" + PLUGIN_ALIASES["k3s"]="scheduler-k3s" + PLUGIN_ALIASES["lambda"]="builder-lambda" + PLUGIN_ALIASES["nixpacks"]="builder-nixpacks" + PLUGIN_ALIASES["pack"]="builder-pack" + PLUGIN_ALIASES["rails"]="builder-railpack" local plugin_alias_source="${PLUGIN_NAME%%:*}" local plugin_alias_target="${PLUGIN_ALIASES[$plugin_alias_source]}"