bakpakin / Fennel

Lua Lisp Language
https://fennel-lang.org
MIT License
2.42k stars 124 forks source link

Fix bug in apropos REPL commands #481

Closed wrance closed 2 months ago

wrance commented 2 months ago

Fix bug described in https://github.com/bakpakin/Fennel/issues/462 by stripping _.G from the input rather than the output of the apropos* function. This appears to have been the original intended behavior as described by the comment on line 206.

technomancy commented 2 months ago

Looks great; thanks! I've applied your patch using git instead of using github's flow, so it doesn't register as merged, but it is there.

I think I will leave #462 open because while this does allow apropos to find the function in question, it shows under _G.___replLocals___, which is a little counter-intuitive. But it's a big improvement over before where we didn't show it at all!

Thanks again.

wrance commented 2 months ago

Awesome thanks! Is there another place that would be more intuitive to find it under? Or are you just suggesting that that part be stripped from the output string?

technomancy commented 2 months ago

Yeah, I just meant the prefix should be excluded since anyone in the repl would be able to access those values by just typing them directly in.