From 308033bd109ca3b0e134cdb73ce1a19fae0fa68c Mon Sep 17 00:00:00 2001 From: Johan Gyllenspetz Date: Thu, 7 Aug 2025 04:05:18 -0700 Subject: [PATCH] Allow selecting themes for deletion (#533) Co-authored-by: Johan Gyllenspetz Co-authored-by: David Heinemeier Hansson --- bin/omarchy-theme-remove | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/omarchy-theme-remove b/bin/omarchy-theme-remove index d0463cb8..0fcc00da 100755 --- a/bin/omarchy-theme-remove +++ b/bin/omarchy-theme-remove @@ -4,10 +4,10 @@ # Usage: omarchy-theme-remove if [ -z "$1" ]; then - extra_themes=$(find ~/.config/omarchy/themes -mindepth 1 -maxdepth 1 -type d ! -xtype l -printf '%f\n') + mapfile -t extra_themes < <(find ~/.config/omarchy/themes -mindepth 1 -maxdepth 1 -type d ! -xtype l -printf '%f\n') - if [[ -n "$extra_themes" ]]; then - THEME_NAME=$(echo -e "$extra_themes" | gum choose --header="Remove extra theme") + if [[ ${#extra_themes[@]} -gt 0 ]]; then + THEME_NAME=$(gum choose --header="Remove extra theme" "${extra_themes[@]}") else echo "No extra themes installed." exit 1