aboutsummaryrefslogtreecommitdiff
path: root/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands.go')
-rw-r--r--commands.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/commands.go b/commands.go
index 023a112..9d31614 100644
--- a/commands.go
+++ b/commands.go
@@ -37,15 +37,11 @@ func RunCommand(input string) {
// Edit shortcuts for external commands and piping
switch input[0] {
- case '!':
- fallthrough
- case '<':
- fallthrough
- case '>':
- fallthrough
- case '|':
+ case '!', '<', '>', '|':
CmdEdit(input)
}
+
+ CmdEdit("!" + input)
}
func CmdExit(args string) {
@@ -116,7 +112,7 @@ func CmdEdit(args string) {
// if command produced output, print it
outstr := string(out)
if outstr != "" {
- printMsg("%s\n", outstr)
+ printMsg("%s", outstr)
}
default:
printMsg("?\n")