Skip to content

Add link to Ruby options doc in help text #14142

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

Merged
merged 1 commit into from
Aug 13, 2025

Conversation

peterzhu2118
Copy link
Member

Adds link to https://docs.ruby-lang.org/en/master/ruby/options_md.html in Ruby help text (-h and --help).

Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

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

This is great!
And I think it'd be helpful to add comments in options.md to remind future devs that the file is linked in the help message, and renaming/moving that file requires a change here.

@st0012
Copy link
Member

st0012 commented Aug 7, 2025

Just confirmed that html comments work with RDoc:

<!---
  Important! This page's link on docs.ruby-lang.org is displayed in Ruby's help message.
  Please make sure you update the link when renaming or moving this file.
--->

Copy link

launchable-app bot commented Aug 8, 2025

Tests Failed

✖️no tests failed ✔️62183 tests passed(3 flakes)

Comment on lines +408 to +410
printf("Details and examples at https://docs.ruby-lang.org/en/%s/ruby/options_md.html\n",
RUBY_PATCHLEVEL == -1 ? "master" : STRINGIZE(RUBY_VERSION_MAJOR) "." STRINGIZE(RUBY_VERSION_MINOR));

Copy link
Member

Choose a reason for hiding this comment

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

Detailed info should be only when --help.
And keep revision info only in version.c.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure what you mean here.

Detailed info should be only when --help.

We're not showing any detailed info? Just linking to a web page that could explain and give examples about the options in -h and --help. I think it should be shown for both of these cases. Do you have other opinions?

And keep revision info only in version.c.

Do you mean the use of RUBY_PATCHLEVEL? How would we get the information about whether to use master or a version otherwise?

@peterzhu2118 peterzhu2118 merged commit 31ff07e into ruby:master Aug 13, 2025
83 of 84 checks passed
@peterzhu2118 peterzhu2118 deleted the help-link branch August 13, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants