#!/usr/bin/env zsh selection=$(find /etc/yum.repos.d -type f -name "*.repo" | gum choose --no-limit) format_string_array=( "# You selected the following repo file(s):\n" ) echo "$selection" | while read -r line; do format_string_array+=("- $line\n"); done echo "${format_string_array[@]}" | gum format echo "" if gum confirm "Are you sure you want to delete?"; then sudo rm -v $(echo "$selection") else echo ":raised_eyebrow: Oh, okay then. Carry on." | gum format -t emoji fi