Skip to content

Commit

Permalink
Document commands and special locals (#64)
Browse files Browse the repository at this point in the history
refs #63, #56
  • Loading branch information
veelenga authored Oct 9, 2017
1 parent 2c3946a commit 7d33305
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Interactive console for [Crystal Programming Language](http://crystal-lang.org/)
* [Installation](#installation)
* [Arch Linux](#arch-linux)
* [How does it work?](#how-does-it-work)
* [Commands and special locals](#commands-and-special-locals)
* [Development](#development)
* [Contributors](#contributors)

Expand Down Expand Up @@ -78,6 +79,20 @@ Arch Linux users can install ICR [from AUR](https://aur.archlinux.org/packages/c
* The output is split into 2 parts: regular program output (e.g. output from `puts 10`) and value returned by the last command
* The regular output is saved, and when you type a new instruction, new program is generated. The saved output is subtracted from the new output, and the difference is printed out. It makes an illusion that only new instructions are executed :)

## Commands and special locals

* `paste` - enables paste mode
* `quit` or `exit` - exits current interactive console
* `__` - holds the result of the last expression. Example:

```crystal
icr > "5" + "2"
=> "52"
icr > __.to_i - 10
=> 42
```

## Development

To run tests:
Expand Down

0 comments on commit 7d33305

Please sign in to comment.