Skip to content

Commit

Permalink
make 'julia --help' output more uniform in style. Also update manpage…
Browse files Browse the repository at this point in the history
…, and getting started guide for latest flags.
  • Loading branch information
sjkelly committed Jun 14, 2014
1 parent 308139b commit 01d83ff
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 75 deletions.
81 changes: 46 additions & 35 deletions doc/man/julia.1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
.\" # TODOs:
.\" 1. Simple, hopefully portable way to get the man page on everyone's manpath.
.\" (The whole point was to be able to simply `man julia`!)
.\" 2. Put options in alphabetical order instead of the order from julia --help?
.\"
.\" Possible sections to add to man page:
.\" - licensing
Expand Down Expand Up @@ -50,76 +49,88 @@ For a more in-depth discussion of the rationale and advantages of Julia
over other systems, please see the online manual:
http://docs.julialang.org/en/latest/manual/

If a Julia source file is given as \fIprogram\fP (possibly with arguments in
\fIargs\fP) then, instead of launching an interactive session, Julia executes
the program and exits.
If a Julia source file is given as a \fIprogram\fP (optionally followed by
arguments in \fIargs\fP) Julia will execute the program and exit.

.\" This section was taken nearly verbatim from the output of `julia --help`
.SH "COMMAND-LINE OPTIONS"
.TP 25
-v --version
Display version information

.TP
-q --quiet
Quiet startup without banner
-e, --eval <expr>
Evaluate <expr>

.TP
--color=<yes|no>
Turn colored prompts on (yes) and off (no).
-E, --print <expr>
Evaluate and show <expr>

.TP
-H --home <dir>
Load files relative to <dir>
-f, --no-startup
Don't load ~/.juliarc.jl

.TP
-T --tab <size>
Set REPL tab width to <size>
-F
Load ~/.juliarc.jl, then handle remaining inputs

.TP
-e --eval <expr>
Evaluate <expr>
-h, --help
Print this message

.TP
-E --print <expr>
Evaluate and show <expr>
-H, --home <dir>
Set location of julia executable

.TP
-P --post-boot <expr>
Evaluate <expr> right after boot
-i
Force isinteractive() to be true

.TP
-L --load file
Load <file> right after boot on all processors
-J, --sysimage <file>
Start up with the given system image file

.TP
-J --sysimage file
Start up with the given system image file
-L, --load <file>
Load <file> right after boot on all processors

.TP
-p n
-p <n>
Run n local processes

.TP
--machinefile file
Run processes on hosts listed in file
-P, --post-boot <expr>
Evaluate <expr> right after boot

.TP
--no-history
Don't load or save history
-q, --quiet
Quiet startup without banner

.TP
-f --no-startup
Don't load ~/.juliarc.jl
-v, --version
Display version information

.TP
-F
Load ~/.juliarc.jl, then handle remaining inputs
--code-coverage
Count executions of source lines

.TP
--color={yes|no}
Enable or disable color text

.TP
--check-bounds={yes|no}
Emit bounds checks always or never (ignoring declarations)

.TP
-h --help
Print a help message displaying command-line arguments
--int-literals={32|64}
Select integer literal size independent of platform

.TP
--machinefile <file>
Run processes on hosts listed in <file>

.TP
--no-history-file
Don't load or save history

.SH FILES
.I ~/.juliarc.jl
Expand Down
53 changes: 28 additions & 25 deletions doc/manual/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ interactive session (also known as a read-eval-print loop or "repl")::

$ julia
_
_ _ _(_)_ |
(_) | (_) (_) | A fresh approach to technical computing.
_ _ _| |_ __ _ |
| | | | | | |/ _` | | Version 0 (pre-release)
| | |_| | | | (_| | | Commit 61847c5aa7 (2011-08-20 06:11:31)*
_/ |\__'_|_|_|\__'_| |
_ _ _(_)_ | A fresh approach to technical computing.
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0 (pre-release)
_/ |\__'_|_|_|\__'_| | Commit 61847c5aa7 (2011-08-20 06:11:31)*
|__/ |

julia> 1 + 2
Expand Down Expand Up @@ -99,27 +99,30 @@ There are various ways to run Julia code and provide options, similar to
those available for the ``perl`` and ``ruby`` programs::

julia [options] [program] [args...]
-v --version Display version information
-h --help Print this message
-q --quiet Quiet startup without banner
-H --home=<dir> Load files relative to <dir>
-T --tab=<size> Set REPL tab width to <size>

-e --eval=<expr> Evaluate <expr>
-E --print=<expr> Evaluate and show <expr>
-P --post-boot=<expr> Evaluate <expr> right after boot
-L --load=file Load <file> right after boot on all processors
-J --sysimage=file Start up with the given system image file

-p n Run n local processes
--machinefile file Run processes on hosts listed in file

--no-history Don't load or save history
-f --no-startup Don't load ~/.juliarc.jl
-v, --version Display version information
-h, --help Print this message
-q, --quiet Quiet startup without banner
-H, --home <dir> Set location of julia executable

-e, --eval <expr> Evaluate <expr>
-E, --print <expr> Evaluate and show <expr>
-P, --post-boot <expr> Evaluate <expr> right after boot
-L, --load <file> Load <file> right after boot on all processors
-J, --sysimage <file> Start up with the given system image file

-p <n> Run n local processes
--machinefile <file> Run processes on hosts listed in <file>

-i Force isinteractive() to be true
--no-history-file Don't load or save history
-f, --no-startup Don't load ~/.juliarc.jl
-F Load ~/.juliarc.jl, then handle remaining inputs
--color=yes|no Enable or disable color text
--color={yes|no} Enable or disable color text

--code-coverage Count executions of source lines
--check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)
--int-literals={32|64} Select integer literal size independent of platform

--check-bounds=yes|no Emit bounds checks always or never (ignoring declarations)

Resources
---------
Expand Down
30 changes: 15 additions & 15 deletions ui/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,29 @@ char *image_file = NULL;

static const char *usage = "julia [options] [program] [args...]\n";
static const char *opts =
" -v --version Display version information\n"
" -h --help Print this message\n"
" -q --quiet Quiet startup without banner\n"
" -H --home <dir> Set location of julia executable\n\n"
" -v, --version Display version information\n"
" -h, --help Print this message\n"
" -q, --quiet Quiet startup without banner\n"
" -H, --home <dir> Set location of julia executable\n\n"

" -e --eval <expr> Evaluate <expr>\n"
" -E --print <expr> Evaluate and show <expr>\n"
" -P --post-boot <expr> Evaluate <expr> right after boot\n"
" -L --load file Load <file> right after boot on all processors\n"
" -J --sysimage file Start up with the given system image file\n\n"
" -e, --eval <expr> Evaluate <expr>\n"
" -E, --print <expr> Evaluate and show <expr>\n"
" -P, --post-boot <expr> Evaluate <expr> right after boot\n"
" -L, --load <file> Load <file> right after boot on all processors\n"
" -J, --sysimage <file> Start up with the given system image file\n\n"

" -p n Run n local processes\n"
" --machinefile file Run processes on hosts listed in file\n\n"
" -p <n> Run n local processes\n"
" --machinefile <file> Run processes on hosts listed in <file>\n\n"

" -i Force isinteractive() to be true\n"
" --no-history-file Don't load or save history\n"
" -f --no-startup Don't load ~/.juliarc.jl\n"
" -f, --no-startup Don't load ~/.juliarc.jl\n"
" -F Load ~/.juliarc.jl, then handle remaining inputs\n"
" --color=yes|no Enable or disable color text\n\n"
" --color={yes|no} Enable or disable color text\n\n"

" --code-coverage Count executions of source lines\n"
" --check-bounds=yes|no Emit bounds checks always or never (ignoring declarations)\n"
" --int-literals=32|64 Select integer literal size independent of platform\n";
" --check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)\n"
" --int-literals={32|64} Select integer literal size independent of platform\n";

void parse_opts(int *argcp, char ***argvp)
{
Expand Down

0 comments on commit 01d83ff

Please sign in to comment.