Skip to content

Commit

Permalink
move REPL docs to stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Jan 14, 2018
1 parent fb5d2f0 commit cceda76
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 19 deletions.
9 changes: 4 additions & 5 deletions doc/make.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Install dependencies needed to build the documentation.
ENV["JULIA_PKGDIR"] = joinpath(@__DIR__, "deps")
Pkg.init()
cp(joinpath(@__DIR__, "REQUIRE"), Pkg.dir("REQUIRE"); remove_destination = true)
Pkg.update()
Pkg.resolve()
#Pkg.init()
#cp(joinpath(@__DIR__, "REQUIRE"), Pkg.dir("REQUIRE"); remove_destination = true)
#Pkg.update()
#Pkg.resolve()

using Documenter

Expand Down Expand Up @@ -73,7 +73,6 @@ const PAGES = [
"manual/networking-and-streams.md",
"manual/parallel-computing.md",
"manual/dates.md",
"manual/interacting-with-julia.md",
"manual/running-external-programs.md",
"manual/calling-c-and-fortran-code.md",
"manual/handling-operating-system-variation.md",
Expand Down
1 change: 0 additions & 1 deletion doc/src/base/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Some general notes:
Base.exit
Base.quit
Base.atexit
Base.atreplinit
Base.isinteractive
Base.varinfo
Base.summarysize
Expand Down
2 changes: 1 addition & 1 deletion doc/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Please read the [release notes](NEWS.md) to see what has changed since the last
* [Calling C and Fortran Code](@ref)
* [Handling Operating System Variation](@ref)
* [Environment Variables](@ref)
* [Interacting With Julia](@ref)
* [Embedding Julia](@ref)
* [Packages](@ref)
* [Profiling](@ref)
Expand Down Expand Up @@ -79,6 +78,7 @@ Please read the [release notes](NEWS.md) to see what has changed since the last

## Standard Library

* [The Julia REPL](@ref)
* [Base64](@ref)
* [CRC32c](@ref)
* [Dates and Time](@ref stdlib-dates)
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Environment variables that determine how REPL output should be formatted at the
terminal. Generally, these variables should be set to [ANSI terminal escape
sequences](http://ascii-table.com/ansi-escape-sequences.php). Julia provides
a high-level interface with much of the same functionality: see the section on
[Interacting With Julia](@ref).
[The Julia REPL](@ref).

### `JULIA_ERROR_COLOR`

Expand Down
1 change: 0 additions & 1 deletion doc/src/manual/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* [Calling C and Fortran Code](@ref)
* [Handling Operating System Variation](@ref)
* [Environment Variables](@ref)
* [Interacting With Julia](@ref)
* [Embedding Julia](@ref)
* [Packages](@ref)
* [Package Development](@ref)
Expand Down
6 changes: 3 additions & 3 deletions doc/src/manual/unicode-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the symbol).
#
# Generate a table containing all LaTeX and Emoji tab completions available in the REPL.
#
import REPL
const NBSP = '\u00A0'
function tab_completions(symbols...)
Expand Down Expand Up @@ -75,8 +75,8 @@ end
table_entries(
tab_completions(
Base.REPLCompletions.latex_symbols,
Base.REPLCompletions.emoji_symbols
REPL.REPLCompletions.latex_symbols,
REPL.REPLCompletions.emoji_symbols
),
unicode_data()
)
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/workflow-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Here are some tips for working with Julia efficiently.

## REPL-based workflow

As already elaborated in [Interacting With Julia](@ref), Julia's REPL provides rich functionality
As already elaborated in [The Julia REPL](@ref), Julia's REPL provides rich functionality
that facilitates an efficient interactive workflow. Here are some tips that might further enhance
your experience at the command line.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Interacting With Julia
# The Julia REPL

Julia comes with a full-featured interactive command-line REPL (read-eval-print loop) built into
the `julia` executable. In addition to allowing quick and easy evaluation of Julia statements,
Expand Down Expand Up @@ -196,16 +196,17 @@ to do so).
### Customizing keybindings

Julia's REPL keybindings may be fully customized to a user's preferences by passing a dictionary
to `REPL.setup_interface()`. The keys of this dictionary may be characters or strings. The key
to `REPL.setup_interface`. The keys of this dictionary may be characters or strings. The key
`'*'` refers to the default action. Control plus character `x` bindings are indicated with `"^x"`.
Meta plus `x` can be written `"\\Mx"`. The values of the custom keymap must be `nothing` (indicating
that the input should be ignored) or functions that accept the signature `(PromptState, AbstractREPL, Char)`.
The `REPL.setup_interface()` function must be called before the REPL is initialized, by registering
the operation with `atreplinit()`. For example, to bind the up and down arrow keys to move through
The `REPL.setup_interface` function must be called before the REPL is initialized, by registering
the operation with [`atreplinit`](@ref) . For example, to bind the up and down arrow keys to move through
history without prefix search, one could put the following code in `.juliarc.jl`:

```julia
import Base: LineEdit, REPL
import REPL
import REPL.LineEdit

const mykeys = Dict{Any,Any}(
# Up Arrow
Expand Down Expand Up @@ -255,7 +256,7 @@ julia> e¹ = [1 0]
1×2 Array{Int64,2}:
1 0
julia> \sqrt[TAB]2 # √ is equivalent to the sqrt() function
julia> \sqrt[TAB]2 # √ is equivalent to the sqrt function
julia> √2
1.4142135623730951
Expand Down Expand Up @@ -375,3 +376,9 @@ ENV["JULIA_ERROR_COLOR"] = :magenta
ENV["JULIA_WARN_COLOR"] = :yellow
ENV["JULIA_INFO_COLOR"] = :cyan
```

## References

```@docs
REPL.atreplinit
```

0 comments on commit cceda76

Please sign in to comment.