This commit is contained in:
zenobit 2023-03-17 00:52:53 +01:00
parent d81410ebaa
commit c2abbecf52

4
dh
View file

@ -27,14 +27,14 @@ if [ $1 = -t ] ; then
if ! command -v fzf >/dev/null 2>&1; then if ! command -v fzf >/dev/null 2>&1; then
echo "You are missing fzf..." && exit 255 echo "You are missing fzf..." && exit 255
fi fi
printf ' Prepared VMs:\n-------------\n' printf ' Prepared VMs:\n-------------\n%s\n'
# Check if there are any VMs # Check if there are any VMs
if [ ${#vms[@]} -eq 0 ]; then if [ ${#vms[@]} -eq 0 ]; then
echo "No VMs found." echo "No VMs found."
exit 1 exit 1
fi fi
# Print the names of the available VMs # Print the names of the available VMs
printf "%s\n" "${vms[@]%.conf}" printf "%s\n" "${vms[@]%.*}"
echo "-------------" echo "-------------"
# Action prompt # Action prompt
printf " Do you want to create a new VM? (c) printf " Do you want to create a new VM? (c)