Skip to content

Commit c760957

Browse files
authored
Move command-line options out of Getting Started to separate page, fixes #28845 (#37982)
1 parent 6c8afcb commit c760957

File tree

3 files changed

+46
-39
lines changed

3 files changed

+46
-39
lines changed

doc/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Manual = [
9191
"manual/faq.md",
9292
"manual/noteworthy-differences.md",
9393
"manual/unicode-input.md",
94+
"manual/command-line-options.md",
9495
]
9596

9697
BaseDocs = [
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# [Command-line Options](@id command-line-options)
2+
3+
The following is a complete list of command-line switches available when launching julia:
4+
5+
|Switch |Description|
6+
|:--- |:---|
7+
|`-v`, `--version` |Display version information|
8+
|`-h`, `--help` |Print command-line options (this message).|
9+
|`--project[={<dir>\|@.}]` |Set <dir> as the home project/environment. The default @. option will search through parent directories until a Project.toml or JuliaProject.toml file is found.|
10+
|`-J`, `--sysimage <file>` |Start up with the given system image file|
11+
|`-H`, `--home <dir>` |Set location of `julia` executable|
12+
|`--startup-file={yes\|no}` |Load `~/.julia/config/startup.jl`|
13+
|`--handle-signals={yes\|no}` |Enable or disable Julia's default signal handlers|
14+
|`--sysimage-native-code={yes\|no}` |Use native code from system image if available|
15+
|`--compiled-modules={yes\|no}` |Enable or disable incremental precompilation of modules|
16+
|`-e`, `--eval <expr>` |Evaluate `<expr>`|
17+
|`-E`, `--print <expr>` |Evaluate `<expr>` and display the result|
18+
|`-L`, `--load <file>` |Load `<file>` immediately on all processors|
19+
|`-t`, `--threads {N\|auto`} |Enable N threads; `auto` currently sets N to the number of local CPU threads but this might change in the future|
20+
|`-p`, `--procs {N\|auto`} |Integer value N launches N additional local worker processes; `auto` launches as many workers as the number of local CPU threads (logical cores)|
21+
|`--machine-file <file>` |Run processes on hosts listed in `<file>`|
22+
|`-i` |Interactive mode; REPL runs and `isinteractive()` is true|
23+
|`-q`, `--quiet` |Quiet startup: no banner, suppress REPL warnings|
24+
|`--banner={yes\|no\|auto}` |Enable or disable startup banner|
25+
|`--color={yes\|no\|auto}` |Enable or disable color text|
26+
|`--history-file={yes\|no}` |Load or save history|
27+
|`--depwarn={yes\|no\|error}` |Enable or disable syntax and method deprecation warnings (`error` turns warnings into errors)|
28+
|`--warn-overwrite={yes\|no}` |Enable or disable method overwrite warnings|
29+
|`-C`, `--cpu-target <target>` |Limit usage of CPU features up to `<target>`; set to `help` to see the available options|
30+
|`-O`, `--optimize={0,1,2,3}` |Set the optimization level (default level is 2 if unspecified or 3 if used without a level)|
31+
|`-g`, `-g <level>` |Enable / Set the level of debug info generation (default level is 1 if unspecified or 2 if used without a level)|
32+
|`--inline={yes\|no}` |Control whether inlining is permitted, including overriding `@inline` declarations|
33+
|`--check-bounds={yes\|no}` |Emit bounds checks always or never (ignoring declarations)|
34+
|`--math-mode={ieee,fast}` |Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration)|
35+
|`--code-coverage={none\|user\|all}` |Count executions of source lines|
36+
|`--code-coverage` |equivalent to `--code-coverage=user`|
37+
|`--track-allocation={none\|user\|all}` |Count bytes allocated by each source line|
38+
|`--track-allocation` |equivalent to `--track-allocation=user`|
39+
40+
!!! compat "Julia 1.1"
41+
In Julia 1.0, the default `--project=@.` option did not search up from the root
42+
directory of a Git repository for the `Project.toml` file. From Julia 1.1 forward, it
43+
does.

doc/src/manual/getting-started.md

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -97,45 +97,8 @@ There are various ways to run Julia code and provide options, similar to those a
9797
julia [switches] -- [programfile] [args...]
9898
```
9999

100-
|Switch |Description|
101-
|:--- |:---|
102-
|`-v`, `--version` |Display version information|
103-
|`-h`, `--help` |Print command-line options (this message).|
104-
|`--project[={<dir>\|@.}]` |Set <dir> as the home project/environment. The default @. option will search through parent directories until a Project.toml or JuliaProject.toml file is found.|
105-
|`-J`, `--sysimage <file>` |Start up with the given system image file|
106-
|`-H`, `--home <dir>` |Set location of `julia` executable|
107-
|`--startup-file={yes\|no}` |Load `~/.julia/config/startup.jl`|
108-
|`--handle-signals={yes\|no}` |Enable or disable Julia's default signal handlers|
109-
|`--sysimage-native-code={yes\|no}` |Use native code from system image if available|
110-
|`--compiled-modules={yes\|no}` |Enable or disable incremental precompilation of modules|
111-
|`-e`, `--eval <expr>` |Evaluate `<expr>`|
112-
|`-E`, `--print <expr>` |Evaluate `<expr>` and display the result|
113-
|`-L`, `--load <file>` |Load `<file>` immediately on all processors|
114-
|`-t`, `--threads {N\|auto`} |Enable N threads; `auto` currently sets N to the number of local CPU threads but this might change in the future|
115-
|`-p`, `--procs {N\|auto`} |Integer value N launches N additional local worker processes; `auto` launches as many workers as the number of local CPU threads (logical cores)|
116-
|`--machine-file <file>` |Run processes on hosts listed in `<file>`|
117-
|`-i` |Interactive mode; REPL runs and `isinteractive()` is true|
118-
|`-q`, `--quiet` |Quiet startup: no banner, suppress REPL warnings|
119-
|`--banner={yes\|no\|auto}` |Enable or disable startup banner|
120-
|`--color={yes\|no\|auto}` |Enable or disable color text|
121-
|`--history-file={yes\|no}` |Load or save history|
122-
|`--depwarn={yes\|no\|error}` |Enable or disable syntax and method deprecation warnings (`error` turns warnings into errors)|
123-
|`--warn-overwrite={yes\|no}` |Enable or disable method overwrite warnings|
124-
|`-C`, `--cpu-target <target>` |Limit usage of CPU features up to `<target>`; set to `help` to see the available options|
125-
|`-O`, `--optimize={0,1,2,3}` |Set the optimization level (default level is 2 if unspecified or 3 if used without a level)|
126-
|`-g`, `-g <level>` |Enable / Set the level of debug info generation (default level is 1 if unspecified or 2 if used without a level)|
127-
|`--inline={yes\|no}` |Control whether inlining is permitted, including overriding `@inline` declarations|
128-
|`--check-bounds={yes\|no}` |Emit bounds checks always or never (ignoring declarations)|
129-
|`--math-mode={ieee,fast}` |Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration)|
130-
|`--code-coverage={none\|user\|all}` |Count executions of source lines|
131-
|`--code-coverage` |equivalent to `--code-coverage=user`|
132-
|`--track-allocation={none\|user\|all}` |Count bytes allocated by each source line|
133-
|`--track-allocation` |equivalent to `--track-allocation=user`|
134-
135-
!!! compat "Julia 1.1"
136-
In Julia 1.0, the default `--project=@.` option did not search up from the root
137-
directory of a Git repository for the `Project.toml` file. From Julia 1.1 forward, it
138-
does.
100+
A detailed list of all the available switches can be found at [Command-line Options](@ref
101+
command-line-options).
139102

140103
## Resources
141104

0 commit comments

Comments
 (0)