execute multiple commands with command flag

Related #135
This commit is contained in:
Gokcehan 2019-02-08 19:54:04 +03:00
parent ca95bcf1d8
commit 245db502cc

10
app.go
View File

@ -144,9 +144,13 @@ func (app *app) loop() {
if gCommand != "" {
p := newParser(strings.NewReader(gCommand))
if e := p.parseExpr(); e != nil {
log.Printf("evaluating start command: %s", e.String())
e.eval(app, nil)
for p.parse() {
p.expr.eval(app, nil)
}
if p.err != nil {
app.ui.printf("%s", p.err)
}
}