stdlib Call, fg, bg, $, and cd functions. wow

This commit is contained in:
Aidan 2020-06-27 20:31:49 -07:00
parent 94c9b2beba
commit af184d9176
No known key found for this signature in database
GPG key ID: 327711E983899316
6 changed files with 272 additions and 33 deletions

View file

@ -109,12 +109,16 @@ func main() {
}
result, unwrap := userInput.Eval(funcs, vars)
if unwrap {
result = result.Inner.(*ast.Token)
}
for i := result; i != nil; i = i.Next {
fmt.Printf(i.String() + " ")
if result != nil {
if result.Tag == ast.LIST && unwrap {
result = result.Inner.(*ast.Token)
}
for i := result; i != nil; i = i.Next {
fmt.Printf(i.String() + " ")
}
}
fmt.Printf("\n")
}
}