Skip to content

Commit

Permalink
chore: Update zsh completion installation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
cirolosapio committed Apr 20, 2024
1 parent f676b7a commit 2fa4737
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 89 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- [alpine-git](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-git)
- [alpine-mage2postman](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-mage2postman)
- [alpine-magento-cloud-cli](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-magento-cloud-cli)
- [alpine-n98-magerun](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-n98-magerun)
- [alpine-n98-magerun2](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-n98-magerun2)
- [alpine-nano](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-nano)
- [alpine-navi](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-navi)
- [alpine-node](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-node)
Expand Down
11 changes: 2 additions & 9 deletions src/alpine-aws-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"name": "alpine-aws-cli",
"id": "alpine-aws-cli",
"version": "0.0.2",
"version": "0.0.3",
"description": "Installs aws-cli on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-aws-cli",
"installsAfter": [
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh"
],
"options": {
"initZsh": {
"type": "boolean",
"default": true,
"description": "Init zsh"
}
}
]
}
2 changes: 1 addition & 1 deletion src/alpine-aws-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Activating feature 'alpine-aws-cli'"

apk --no-cache add aws-cli

if [[ $INITZSH == "true" ]]; then
if command -v zsh &> /dev/null; then
apk --no-cache add aws-cli-zsh-completion
fi

Expand Down
11 changes: 2 additions & 9 deletions src/alpine-bat/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"name": "alpine-bat",
"id": "alpine-bat",
"version": "0.0.8",
"version": "0.0.9",
"description": "Installs bat on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-bat",
"installsAfter": [
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh"
],
"options": {
"initZsh": {
"type": "boolean",
"default": true,
"description": "Init zsh"
}
}
]
}
2 changes: 1 addition & 1 deletion src/alpine-bat/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Activating feature 'alpine-bat'"

apk --no-cache add bat

if [[ $INITZSH == "true" ]]; then
if command -v zsh &> /dev/null; then
apk --no-cache add bat-zsh-completion
echo "alias cat=bat" >> $_CONTAINER_USER_HOME/.zshrc
fi
Expand Down
11 changes: 2 additions & 9 deletions src/alpine-bottom/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"name": "alpine-bottom",
"id": "alpine-bottom",
"version": "0.0.4",
"version": "0.0.5",
"description": "Installs bottom on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-bottom",
"installsAfter": [
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh"
],
"options": {
"initZsh": {
"type": "boolean",
"default": true,
"description": "Init zsh"
}
}
]
}
2 changes: 1 addition & 1 deletion src/alpine-bottom/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Activating feature 'alpine-bottom'"

apk --no-cache add bottom

if [[ $INITZSH == "true" ]]; then
if command -v zsh &> /dev/null; then
apk --no-cache add bottom-zsh-completion
fi

Expand Down
11 changes: 2 additions & 9 deletions src/alpine-broot/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"name": "alpine-broot",
"id": "alpine-broot",
"version": "0.0.3",
"version": "0.0.4",
"description": "Installs broot on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-broot",
"installsAfter": [
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh"
],
"options": {
"initZsh": {
"type": "boolean",
"default": true,
"description": "Init zsh"
}
}
]
}
2 changes: 1 addition & 1 deletion src/alpine-broot/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Activating feature 'alpine-broot'"

apk --no-cache add broot

if [[ $INITZSH == "true" ]]; then
if command -v zsh &> /dev/null; then
apk --no-cache add broot-zsh-completion
fi

Expand Down
9 changes: 1 addition & 8 deletions src/alpine-deno/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"name": "alpine-deno",
"id": "alpine-deno",
"version": "0.0.5",
"version": "0.0.6",
"description": "Installs deno on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-deno",
"installsAfter": [
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh"
],
"options": {
"initZsh": {
"type": "boolean",
"default": true,
"description": "Init zsh"
}
},
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion src/alpine-deno/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Activating feature 'alpine-deno'"

apk --no-cache add deno

if [[ $INITZSH == "true" ]]; then
if command -v zsh &> /dev/null; then
apk --no-cache add deno-zsh-completion
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alpine-docker-outside-of-docker",
"id": "alpine-docker-outside-of-docker",
"version": "0.0.9",
"version": "0.0.10",
"description": "Re-use the host docker socket, adding the Docker CLI to alpine container",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-docker-outside-of-docker",
"legacyIds": [
Expand Down
2 changes: 1 addition & 1 deletion src/alpine-docker-outside-of-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if [[ $INSTALLDOCKERCOMPOSE == "true" ]]; then
apk add --no-cache docker-compose
fi

if [[ $INITZSH == "true" ]]; then
if command -v zsh &> /dev/null; then
apk --no-cache add docker-zsh-completion
fi

Expand Down
26 changes: 0 additions & 26 deletions src/alpine-n98-magerun/devcontainer-feature.json

This file was deleted.

File renamed without changes.
24 changes: 24 additions & 0 deletions src/alpine-n98-magerun2/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "alpine-n98-magerun2",
"id": "alpine-n98-magerun2",
"version": "0.0.13",
"description": "Installs n98-magerun2 on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-n98-magerun2",
"legacyIds": [
"alpine-n98-magerun"
],
"installsAfter": [
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh"
],
"options": {
"version": {
"type": "string",
"default": "7.3.1",
"description": "Version of n98-magerun2 to install",
"proposals": [
"7.3.1",
"6.1.1"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ wget -q https://files.magerun.net/n98-magerun2-${VERSION}.phar -O /usr/local/bin
# shasum -a256 n98-magerun2.phar
chmod +x /usr/local/bin/n98-magerun2.phar

if [[ $INITZSH == "true" ]]; then
if command -v zsh &> /dev/null; then
# ZSH PLUGIN
mkdir -p $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/n98-magerun2/
wget -q https://raw.githubusercontent.com/netz98/n98-magerun2/develop/res/autocompletion/zsh/n98-magerun2.plugin.zsh -O $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/n98-magerun2/n98-magerun2.plugin.zsh
Expand Down
11 changes: 2 additions & 9 deletions src/alpine-navi/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"name": "alpine-navi",
"id": "alpine-navi",
"version": "0.0.7",
"version": "0.0.8",
"description": "Installs navi on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-navi",
"installsAfter": [
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh"
],
"options": {
"initZsh": {
"type": "boolean",
"default": true,
"description": "Init zsh configs"
}
}
]
}
2 changes: 1 addition & 1 deletion src/alpine-navi/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Activating feature 'alpine-navi'"

apk --no-cache add skim navi

if [[ $INITZSH == "true" ]]; then
if command -v zsh &> /dev/null; then
echo $'\neval "$(navi widget zsh)"' >> $_CONTAINER_USER_HOME/.zshrc
fi

Expand Down

0 comments on commit 2fa4737

Please sign in to comment.