desertbit/grumble

Backtick (`) in input causes error

Matir opened this issue · 4 comments

Matir commented

When a backtick is the first rune of a word, shlex seems to choke on it. If you run sample/simple:

go run .
foo » `ls`
error: invalid args: Unknown rune: 96

Might be a shlex bug, but there's no GitHub issues enabled there, so I decided to report it here.

Thanks! I'll look into it as well

Confirmed to be a shlex bug

Just found this library: https://github.com/anmitsu/go-shlex
It seems to fix some bugs (handling non-ASCII correct, for example), I will test whether it is of help for us

It actually fixes the problems! Proper rune support, and backticks no longer an issue. Everything else seems to behave as before.

Check out #18