handle carriage return in 'shell-pipe' output

This commit is contained in:
Gokcehan 2018-04-06 15:06:25 +03:00
parent 847c46421c
commit bdf20aa451

2
app.go
View File

@ -245,7 +245,7 @@ func (app *app) runShell(s string, args []string, prefix string) {
}
buf = append(buf, b)
app.ui.exprChan <- multiExpr{&callExpr{"echo", []string{string(buf)}}, 1}
if b == '\n' {
if b == '\n' || b == '\r' {
buf = nil
}
}