From a74a444454a2d244dec5ace9530c2d0366713097 Mon Sep 17 00:00:00 2001 From: Ciro Lo Sapio Date: Thu, 6 Feb 2025 17:40:14 +0100 Subject: [PATCH] bump alpine-ohmyzsh version to 0.0.23 and update plugin handling --- src/alpine-ohmyzsh/devcontainer-feature.json | 11 ++++++++--- src/alpine-ohmyzsh/install.sh | 6 ++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/alpine-ohmyzsh/devcontainer-feature.json b/src/alpine-ohmyzsh/devcontainer-feature.json index b80868b..1aaf7c1 100644 --- a/src/alpine-ohmyzsh/devcontainer-feature.json +++ b/src/alpine-ohmyzsh/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "alpine-ohmyzsh", "id": "alpine-ohmyzsh", - "version": "0.0.22", + "version": "0.0.23", "description": "Installs ohmyzsh on alpine", "documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-ohmyzsh", "installsAfter": [ @@ -9,10 +9,15 @@ "ghcr.io/cirolosapio/devcontainers-features/alpine-starship" ], "options": { - "plugins": { + "defaultPlugins": { "type": "string", "default": "git alias-tips autoupdate zsh-autosuggestions zsh-syntax-highlighting", + "description": "Default OhMyZsh plugins to enable" + }, + "plugins": { + "type": "string", + "default": "", "description": "OhMyZsh plugins to enable" } } -} \ No newline at end of file +} diff --git a/src/alpine-ohmyzsh/install.sh b/src/alpine-ohmyzsh/install.sh index f6c7716..29e69ea 100644 --- a/src/alpine-ohmyzsh/install.sh +++ b/src/alpine-ohmyzsh/install.sh @@ -6,6 +6,12 @@ echo "Activating feature 'alpine-ohmyzsh'" apk --no-cache add git zsh +if [ -z "$PLUGINS" ]; then + PLUGINS=$DEFAULTPLUGINS +else + PLUGINS="$DEFAULTPLUGINS $PLUGINS" +fi + if [ -z "$_CONTAINER_USER_HOME" ]; then if [ -z "$_CONTAINER_USER" ]; then _CONTAINER_USER_HOME=/root