diff --git a/src/rye/devcontainer-feature.json b/src/rye/devcontainer-feature.json index 561e26a..8d874da 100644 --- a/src/rye/devcontainer-feature.json +++ b/src/rye/devcontainer-feature.json @@ -1,6 +1,6 @@ { "name": "Rye", - "version": "1.0.1", + "version": "1.1.0", "id": "rye", "description": "A Hassle-Free Python Experience", "installsAfter": [ @@ -13,6 +13,13 @@ "RYE_NO_AUTO_INSTALL": "1" }, "postCreateCommand": "echo 'source \"$HOME/.rye/env\"' >> ~/.profile", + "options": { + "bashCompletion": { + "type": "boolean", + "description": "Enable bash completion for Rye", + "default": true + } + }, "customizations": { "vscode": { "extensions": [ diff --git a/src/rye/install.sh b/src/rye/install.sh index b7e6659..6ed6e1d 100644 --- a/src/rye/install.sh +++ b/src/rye/install.sh @@ -7,3 +7,9 @@ echo "Activating feature 'rye'" # https://rye.astral.sh/guide/installation/#customized-installation curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash + +if [ "$BASHCOMPLETION" == "true" ]; then + echo "Activating bash completion for 'rye'" + # https://rye.astral.sh/guide/installation/#shell-completion + rye self completion > /etc/bash_completion.d/rye +fi