-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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`.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()
."?
There was a problem hiding this comment.
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 :))
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🇸🇪
Fixes #22765