malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.24k stars 31 forks source link

`repl` and `hilite` hang if empty string is passed #94

Closed ghost closed 3 years ago

ghost commented 3 years ago

ver | repl "" "" hangs ver | hilite -c "" green does not hang and colors the entire output with specified color ver | hilite -c "" green -m hangs

malxau commented 3 years ago

Thanks for letting me know. As you've probably surmised, this happens because searching for an empty string matches at the beginning of the string, and continues matching the same offset without making progress.

I think the best fix for the two tools is a bit different though:

I'll push some changes for these over the next couple days.

malxau commented 3 years ago

I pushed commit 1d494c25673f58d8c13fa3195320fb69ee5c13dc and 67405c6fd98beace8200a51b6ae591d1e51e6be4 for these. Please let me know if you encounter any issues after these commits.

malxau commented 3 years ago

1.60 is in stable now. Please reopen or file another issue if there's still something broken or missing here.