bakpakin / Fennel

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

Fix bug in apropos REPL commands #481

Closed wrnc closed 5 months ago

wrnc commented 5 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 5 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.

wrnc commented 5 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 5 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.