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

stdlib: display help output in expand area #7846

Merged

Conversation

frazze-jobb
Copy link
Contributor

Adds a keyboard hotkey to display help for the function or module directly before the cursor

@frazze-jobb frazze-jobb added the team:VM Assigned to OTP team VM label Nov 9, 2023
@frazze-jobb frazze-jobb self-assigned this Nov 9, 2023
Copy link
Contributor

@garazdawi garazdawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature! I would have thought that would have needed more code.

Add some tests and docs and this this is good to go.

{_,Word,_} = edlin:over_word(Before, [], 0),
Docs = case edlin_context:get_context(Before) of
{function, Mod} when Word =/= [] -> try
c:h1(list_to_atom(Mod), list_to_atom(Word))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if Mod is something like 'OTP-PUB-KEY'. If you use erl_scan:string/1 it will handle the ' for you.

@frazze-jobb
Copy link
Contributor Author

Nice feature! I would have thought that would have needed more code.

Add some tests and docs and this this is good to go.

Its pretty much useless without the paging PR, will finish that one before I finish this one.

@frazze-jobb frazze-jobb force-pushed the frazze/stdlib/shell_help/OTP-18847 branch from 540118f to 6b46430 Compare December 12, 2023 15:26
Copy link
Contributor

github-actions bot commented Dec 12, 2023

CT Test Results

       5 files     276 suites   2h 14m 28s ⏱️
4 822 tests 4 476 ✔️ 343 💤 3
5 885 runs  5 466 ✔️ 416 💤 3

For more details on these failures, see this check.

Results for commit f075334.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

changed formatting of doc text
@frazze-jobb frazze-jobb force-pushed the frazze/stdlib/shell_help/OTP-18847 branch from 6b46430 to f075334 Compare December 17, 2023 15:15
@frazze-jobb frazze-jobb merged commit c54dc0b into erlang:master Dec 18, 2023
16 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants