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