summaryrefslogtreecommitdiff
path: root/interact.go
diff options
context:
space:
mode:
Diffstat (limited to 'interact.go')
-rw-r--r--interact.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/interact.go b/interact.go
index 932ce1d..906d221 100644
--- a/interact.go
+++ b/interact.go
@@ -644,7 +644,19 @@ func interact() {
//fmt.Println("Laboravi emeritus...")
}
+func isInterSure(question string) (bool) {
+ shell := ishell.New()
+ shell.ShowPrompt(false)
+ defer shell.ShowPrompt(true)
+ shell.Printf("%s (type 'y/Y/yes' to confirm) : ",question)
+ line := shell.ReadLine()
+ if ( line == "yes" || line == "y" || line == "Y") {
+ return true
+ } else {
+ return false
+ }
+}
func getInterInput(question string) (out string) {
shell := ishell.New()