summaryrefslogtreecommitdiff
path: root/scripts/yesno
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/yesno')
-rwxr-xr-xscripts/yesno3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/yesno b/scripts/yesno
index 3e10e09..260a23c 100755
--- a/scripts/yesno
+++ b/scripts/yesno
@@ -4,8 +4,11 @@
default=
if [ "$1" = "-y" ]
then default='y'; shift
+elif [[ "$1" = "-n" ]]; then
+ default='n'; shift
fi
+
if [ $# -eq 0 ]
then prompt="yes or no: "
else prompt="$*"