diff options
| author | Mikkel Thestrup <mikkel@mithe.dk> | 2026-01-25 15:38:58 +0100 |
|---|---|---|
| committer | Mikkel Thestrup <mikkel@mithe.dk> | 2026-01-27 22:56:12 +0100 |
| commit | 35536c401016c0ac69c164a65d2c31b74992a808 (patch) | |
| tree | 5e956602dd23b5ab32dc3cb311be151dfdd10ba4 /prompt.sh | |
| download | scripts-35536c401016c0ac69c164a65d2c31b74992a808.tar.gz scripts-35536c401016c0ac69c164a65d2c31b74992a808.zip | |
Initial commit
Diffstat (limited to '')
| -rwxr-xr-x | prompt.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/prompt.sh b/prompt.sh new file mode 100755 index 0000000..df95196 --- /dev/null +++ b/prompt.sh @@ -0,0 +1,8 @@ +#!/bin/sh +############################################################ +# Utility for prompting user affirmation before executing a +# command. +# $1 - Prompt message +# $2 - Command to execute if affirmed +############################################################ +[ $(echo "No\nYes" | dmenu -i -p "$1") = "Yes" ] && $2 |