From 75ea7862cc2c3679f64569da7184eb05f2f756c5 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 27 Apr 2018 04:04:36 -0400 Subject: [PATCH] feat: prime the bash-completion output While not ideal, users can manually update the completion-cache by reconfiguring the installed package, or updating Dokku. --- debian/postinst | 3 +++ rpm/dokku.postinst | 3 +++ 2 files changed, 6 insertions(+) diff --git a/debian/postinst b/debian/postinst index ac40b8e72..bcca83f3b 100755 --- a/debian/postinst +++ b/debian/postinst @@ -80,6 +80,9 @@ case "$1" in echo "Install all core plugins" dokku plugin:install --core + echo "Creating bash-completion cache" + dokku --quiet help --all | awk '/^ /{ print $1 }' | sort > "/var/cache/dokku-completion" + rm -f ${DOKKU_ROOT}/VERSION cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION diff --git a/rpm/dokku.postinst b/rpm/dokku.postinst index 4658c75b1..0ce1168fd 100644 --- a/rpm/dokku.postinst +++ b/rpm/dokku.postinst @@ -37,6 +37,9 @@ setup-plugins() { echo "Install all core plugins" dokku plugin:install --core + + echo "Creating bash-completion cache" + dokku --quiet help --all | awk '/^ /{ print $1 }' | sort > "/var/cache/dokku-completion" } setup-sshcommand() {