compilation is smooth, with libtecla installed. However, when invoking oh, it initially prints [: ]: unknown operand, and then the prompt '>'. What's worse, the 'script' mode does not work, in which the oh shell only prints the warning mentioned above, then exits.
I've used grep to see where the warning comes from. However the go src and oh do not contains this string.
I believe the warning is produced around the function engine.go/Evaluate.
btw, Linux does not have this issue.
@michaelmacinnis the scrips were from the subdir examples of oh.
My mistake, the script mode works.
But the annoying warnings also exists in script mode, like the title message of this. I was wondering whether it came from zsh. But invoking from bash does not eliminate the warning.
strings /bin/zsh | grep operand
strings /bin/zsh | grep unknown
BTW, the import-prime.oh gives an error message:
oh: interface conversion: *main.Pair is not main.Interface: missing method Access
the import-prime.oh issue was caused by import "./examples/another-prime.oh", so that this script can only be executed under top directory. but error message is confusing...
@michaelmacinnis the annoying warning is caused by the last sentence of raw string in engine.go: [ -r (add $HOME /.ohrc) ] && source (add $HOME /.ohrc). The reason is similar to the post I mentioned above.
the workaround is changing this line to :
test -r (add $HOME /.ohrc) && source (add $HOME /.ohrc)
BTW (both on Linux and OS X):
add in oh:
"oh: interface conversion: *main.Pair is not main.Atom: missing method Add"
source in oh:
it would create a file named () in pwd.