Skip to content

Commit

Permalink
Enable bash completion for rye
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirks committed May 31, 2024
1 parent cef426c commit 92ec2ce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/rye/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Rye",
"version": "1.0.1",
"version": "1.1.0",
"id": "rye",
"description": "A Hassle-Free Python Experience",
"installsAfter": [
Expand All @@ -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": [
Expand Down
6 changes: 6 additions & 0 deletions src/rye/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 92ec2ce

Please sign in to comment.