pipe stdin for 'shell-pipe' commands
This commit is contained in:
1 parent
68232c06e3
commit
c63c8f63ac
3 files changed
+51
-18
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"strconv"
|
||||
@@ -410,6 +411,9 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
app.ui.cmdAccLeft = append(app.ui.cmdAccLeft, []rune(e.args[0])...)
|
||||
}
|
||||
case "cmd-escape":
|
||||
if app.ui.cmdPrefix == ">" {
|
||||
return
|
||||
}
|
||||
app.ui.menuBuf = nil
|
||||
app.ui.cmdAccLeft = nil
|
||||
app.ui.cmdAccRight = nil
|
||||
@@ -453,6 +457,9 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
app.runShell(s, nil, app.ui.cmdPrefix)
|
||||
app.cmdHist = append(app.cmdHist, cmdItem{"%", s})
|
||||
return
|
||||
case ">":
|
||||
io.WriteString(app.cmdIn, s+"\n")
|
||||
return
|
||||
case "!":
|
||||
log.Printf("shell-wait: %s", s)
|
||||
app.runShell(s, nil, app.ui.cmdPrefix)
|
||||
|
||||
Reference in new issue
Block a user