xxwhirlpool
·
2026-03-18
askdd
1#!/usr/bin/env bash
2
3warning() {
4 if [[ "$*" =~ $(df . | awk "{print $1}" | tail -n1) ]]; then
5 if ! gum confirm "WARNING: you are executing this command on your current drive! be careful!" --default="false" --timeout="15s"; then
6 echo "nope"
7 exit 1
8 fi
9 fi
10}
11
12warning "$@"