aboutsummaryrefslogtreecommitdiff
path: root/prompt.sh
diff options
context:
space:
mode:
authorMikkel Thestrup <mikkel@mithe.dk>2026-01-25 15:38:58 +0100
committerMikkel Thestrup <mikkel@mithe.dk>2026-01-27 22:56:12 +0100
commit35536c401016c0ac69c164a65d2c31b74992a808 (patch)
tree5e956602dd23b5ab32dc3cb311be151dfdd10ba4 /prompt.sh
downloadscripts-35536c401016c0ac69c164a65d2c31b74992a808.tar.gz
scripts-35536c401016c0ac69c164a65d2c31b74992a808.zip
Initial commit
Diffstat (limited to 'prompt.sh')
-rwxr-xr-xprompt.sh8
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