Assorted shell and Python scripts
at main 492 B view raw
1#!/usr/bin/env zsh 2 3selection=$(find /etc/yum.repos.d -type f -name "*.repo" | gum choose --no-limit) 4 5format_string_array=( 6 "# You selected the following repo file(s):\n" 7) 8 9echo "$selection" | while read -r line; do format_string_array+=("- $line\n"); done 10echo "${format_string_array[@]}" | gum format 11echo "" 12if gum confirm "Are you sure you want to delete?"; then 13 sudo rm -v $(echo "$selection") 14else 15 echo ":raised_eyebrow: Oh, okay then. Carry on." | gum format -t emoji 16fi