about summary refs log blame commit diff stats
path: root/bin/prompt
blob: fc0a07b475f9a6fd820b1adb10152ba6163b9bae (plain) (tree)
1
2
3
4


                                                                      
                                                      
#!/bin/sh
# calls dmenu with $1 as the prompt and "no" and "yes" as the options.
# if "yes" is chosen, call $2.
[ "$(printf "no\\nyes"|dmenu -p "$1")" = "yes" ] && $2