walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
587 stars 17 forks source link

moar crashed when run invalid regex pattern #149

Closed ciscohack closed 10 months ago

ciscohack commented 10 months ago

moar experienced panic crashes whenever I ran an invalid regex pattern as shown in the screenshot. I am running the latest moar version on my macOS 13.5

image
walles commented 10 months ago

Here's the code returning that error: https://github.com/walles/moar/blob/848958dad029cbc66d5281ec79caf3d833b7293c/twin/screen-setup.go#L60

Can't say how this could happen, but can you try to repro this with:

ciscohack commented 10 months ago

Here I have tried warp terminal and have the same result.

image
walles commented 10 months ago

I was able to repro using ug --pager=moar '[' /dev/null.

ciscohack commented 10 months ago

awesome my friend ...