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

[DOC] Improve the docstrings for quit() and exit() #23309

Merged
merged 1 commit into from
Aug 22, 2017

Conversation

iglpdc
Copy link
Contributor

@iglpdc iglpdc commented Aug 17, 2017

Fixes #22765

base/initdefs.jl Outdated
@@ -21,17 +21,18 @@ const ARGS = String[]
"""
exit([code])

Quit (or control-D at the prompt). The default exit code is zero, indicating that the
Copy link
Member

Choose a reason for hiding this comment

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

Should ^D still be mentioned here? It is mentioned in the key binding docs though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. The line about ^D is in both quit() and exit() docstrings.

base/initdefs.jl Outdated
@@ -21,17 +21,18 @@ const ARGS = String[]
"""
exit([code])
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps update this to

    exit([code=0])

to show the default value here too?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd drop the square brackets if you're going to use julia syntax for default arguments (which I think is clearer anyway)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

base/initdefs.jl Outdated
`exit(0)` (see [`exit`](@ref)).
Quit the program indicating successful completion. This function is equivalent to
`exit(0)` (see [`exit`](@ref)). In an interactive session, `quit()` can be called by
typing the control key together with the `d` key.
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps change to [...] can be called by `^D`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I used the more verbose option in case someone was confused by the ^D, but probably is OK to assume that readers of these docs understand ^D as ctrl+d.

Copy link
Contributor

Choose a reason for hiding this comment

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

readers of these docs understand ^D as ctrl+d.

I agree with your concern that this might not be a given

base/initdefs.jl Outdated

Quit the program with an exit code. The default exit code is zero, indicating that the
program completed successfully (see also [`quit`](@ref)). In an interactive session,
`exit()` can be called by typing `^D`.
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps remove typing since you are not really typing anything? :) Same for quit

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps "In interactive sessions, the key combination control-D calls exit()."?

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps keyboard shortcut (seems more used according to search results on google :))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, done: keyboard shortcut sounds pretty good.

Copy link
Member

@fredrikekre fredrikekre left a comment

Choose a reason for hiding this comment

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

🇸🇪

@fredrikekre fredrikekre merged commit 3a24cbb into JuliaLang:master Aug 22, 2017
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.

4 participants