Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

,apropos-doc should search repl locals too #462

Open
HiPhish opened this issue Aug 20, 2023 · 1 comment
Open

,apropos-doc should search repl locals too #462

HiPhish opened this issue Aug 20, 2023 · 1 comment

Comments

@HiPhish
Copy link

HiPhish commented Aug 20, 2023

Hello,

the ,apropos-doc and ,apropos-show-docs cannot find functions defined on the REPL. Here is what I am doing in a fresh Fennel REPL started from the command-line:

$ fennel
Welcome to Fennel 1.3.1 on PUC Lua 5.3!
Use ,help to see available commands.
>> (fn herp [] "Herp derp lol" :herp)
#<function: 0x559fe514bcf0>
>> (fn derp [] "Herp derp rofl" :derp)
#<function: 0x559fe4f8e450>
>> ,apropos-doc derp

>> ,apropos-show-docs derp

First I define two functions herp and derp which have similar (but not same) docstrings. Then I search for the pattern derp. The first comma-command prints an empty line, the second one does nothing. However, the ,apropos command can find them just fine:

>> ,apropos erp
___repl___.env.___replLocals___.derp	___repl___.env.___replLocals___.herp
@technomancy
Copy link
Collaborator

Yeah, currently those commands only search loaded modules, but they could certainly be extended to also search repl locals. Would be happy to take a patch for this.

wrnc pushed a commit to wrnc/Fennel that referenced this issue Jun 14, 2024
Fix bug described in bakpakin#462
by stripping `_.G` from the input rather than the output of the
`apropos*` function.
technomancy pushed a commit that referenced this issue Jun 14, 2024
Fix bug described in #462
by stripping `_.G` from the input rather than the output of the
`apropos*` function.
reo101 pushed a commit to reo101/Fennel that referenced this issue Jul 30, 2024
Fix bug described in bakpakin#462
by stripping `_.G` from the input rather than the output of the
`apropos*` function.
@technomancy technomancy changed the title ,apropos-doc cannot find functions defined in REPL ,apropos-doc should search repl locals too Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants