*
Jes Olson j3s@c3f.net
Tue, 27 Sep 2022 23:14:49 -0500
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
shell/shell.go
→
shell/shell.go
@@ -34,8 +34,8 @@ // execute every statement individually, decorating
// each with ->, and doing some speshul logicks against // certain strings for _, stmt := range script.Stmts { - cmdName := commandName(stmt) - command, after, _ := strings.Cut(cmdName, " ") + fullCmd := commandName(stmt) + command, after, _ := strings.Cut(fullCmd, " ") if command == "zoa-script" { // recursion detected!!!!!! :3 :3 :3@@ -117,6 +117,8 @@
func commandName(statement *syntax.Stmt) string { b := new(bytes.Buffer) syntax.NewPrinter().Print(b, statement) + command := b.String() + command = strings.Trim(command, "\n ") return b.String() }