mitnk / cicada

An old-school bash-like Unix shell written in Rust
https://hugo.wang/cicada/
MIT License
981 stars 50 forks source link

exit: entity not found #9

Closed ghost closed 6 years ago

ghost commented 6 years ago

Not expected:

$ echo 'echo 1;exit;echo 2'|./target/debug/cicada
1
exit: entity not found
2

Expected (in bash):

$ echo 'echo 1;exit;echo 2'|bash
1

This does work as expected though:

$ echo -e 'echo 1;exit;echo2' >a && chmod u+x a && ./target/debug/cicada ./a
1
mitnk commented 6 years ago

exit is too special.. but, yeah, this is a bug (minor one) I guess. I'll see If we could fix it. Thanks for reporting.

mitnk commented 6 years ago

This has been fixed on latest master. Please have a try.

ghost commented 6 years ago

Impressive extra work and response, thanks! Tested working!