Separate list from command call for readability

This commit is contained in:
David Heinemeier Hansson 2024-06-06 20:57:11 +02:00
parent 93d0630fb0
commit b388f73f7c

View File

@ -1,5 +1,6 @@
# Pick a preconfigured theme # Pick a preconfigured theme
THEME=$(gum choose "Tokyo Night" "Catppuccin" "Everforest" "Gruvbox" "Nord" "Rose Pine" --header "Choose your theme" --height 8 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g') THEME_NAMES=("Tokyo Night" "Catppuccin" "Everforest" "Gruvbox" "Nord" "Rose Pine")
THEME=$(gum choose "${THEME_NAMES[@]}" --header "Choose your theme" --height 8 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
[ ! -n "$THEME" ] && exit 0 [ ! -n "$THEME" ] && exit 0