diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2018-10-14 16:25:11 +0200 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2018-10-14 16:25:11 +0200 |
| commit | 678de29b42ffbf8e0ebc0fcd899cd79a8343273f (patch) | |
| tree | 4739a888b1a7565e6e8165ff5e45ad4cf6d17cb9 /interact.go | |
| parent | ee347df16ef90aea4247f970d752d4cf1d4f47b9 (diff) | |
Added Comments and Variables in DB. sql not backward compatible :(0.2.11
Diffstat (limited to 'interact.go')
| -rw-r--r-- | interact.go | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/interact.go b/interact.go index 24f4e34..3c458e4 100644 --- a/interact.go +++ b/interact.go @@ -727,6 +727,49 @@ func getNewInterInput(question,old string) (string) { } } +func getInterMultiInput(question string) (out string) { + shell := ishell.New() + //shell.ShowPrompt(false) + //defer shell.ShowPrompt(true) + + shell.Println(question,"(Multiline input, end with ';')") + out = shell.ReadMultiLines(";") + shell.Println(" -Done-") + + return +} + +func getNewInterMultiInput(question,old string) (out string) { + shell := ishell.New() + //shell.ShowPrompt(false) + //defer shell.ShowPrompt(true) + + if old != "" { + shell.Println("Current:\n",old) + } + shell.Println("Should current entry be replaced? A Newline will be added otherwise") + if isInterSure(" "){ + shell.Println(question,"(Multiline input, end with ';')") + out = shell.ReadMultiLines(";") + shell.Println(" -Done-") + }else{ + shell.Print(question) + txt := shell.ReadLine() + if txt == "" { + out = old + }else{ + out = old + "\n" + txt + } + } + + return + /*if line == "" { + return old + }else{ + return line + }*/ +} + func multichoice(about string) { shell := ishell.New() |
