Skip to content

Commit

Permalink
release 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Hauman committed Mar 28, 2018
1 parent d5c752c commit ae999ca
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 12 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you want to try this really quickly
and then invoke this:

```shell
clojure -Sdeps "{:deps {com.bhauman/rebel-readline {:mvn/version \"0.1.1\"}}}" -m rebel-readline.main
clojure -Sdeps "{:deps {com.bhauman/rebel-readline {:mvn/version \"0.1.2\"}}}" -m rebel-readline.main
```

That should start a Clojure REPL that takes its input from the Rebel readline editor.
Expand All @@ -50,7 +50,7 @@ Alternatively you can specify an alias in your `$HOME/.clojure/deps.edn`
```clojure
{
...
:aliases {:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.1"}}
:aliases {:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.2"}}
:main-opts ["-m" "rebel-readline.main"]}}
}
```
Expand All @@ -63,7 +63,7 @@ $ clojure -A:rebel

#### Leiningen

Add `[com.bhauman/rebel-readline "0.1.1"]` to the dependencies in your
Add `[com.bhauman/rebel-readline "0.1.2"]` to the dependencies in your
`project.clj` then start a REPL like this:

```shell
Expand All @@ -75,7 +75,7 @@ Alternatively, you can add rebel-readline globally to `$HOME/.lein/profiles.clj`
```clojure
{
...
:user {:dependencies [[com.bhauman/rebel-readline "0.1.1"]]}
:user {:dependencies [[com.bhauman/rebel-readline "0.1.2"]]}
}
```

Expand Down Expand Up @@ -140,8 +140,38 @@ following options:
:redirect-output - boolean, rebinds root *out* during read to protect linereader
Defaults to true
:key-bindings - map of key-bindings that get applied after all other key
bindings have been applied
```

#### Key binding config

You can configure key bindings in the config file, but your milage may vary.

Example:

```
{
...
:key-bindings { :emacs [["^D" :clojure-doc-at-point]]
:viins [["^J" :clojure-force-accept-line]] }
}
```

Serialized keybindings are tricky and the keybinding strings are translated with
`org.jline.keymap.KeyMap/translate` which is a bit peculiar in how it translates things.

If you want literal characters you can use a list of chars or ints i.e
`(\\ \d)` instead of the serialized key names. So you can use `(4 4)` inplace of `"^D^D"`.

The best way to look up the available widget names is to use the `:repl/key-bindings`
command at the REPL prompt.

Note: I have found that JLine handles control characters and
alphanumeric characters quite well but if you want to bind special
characters you shouldn't be surprised if it doesn't work that well.

## Quick Lay of the land

You should look at `rebel-readline.clojure.main` and `rebel-readline.core`
Expand Down
4 changes: 2 additions & 2 deletions rebel-readline-cljs/project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject com.bhauman/rebel-readline-cljs "0.1.2-SNAPSHOT"
(defproject com.bhauman/rebel-readline-cljs "0.1.2"
:description "A rebel readline service for ClojureScript"
:url "https://github.com/bhauman/rebel-readline"
:license {:name "Eclipse Public License"
Expand All @@ -8,7 +8,7 @@
:url "https://github.com/bhauman/rebel-readline"
:dir ".."}

:dependencies [[com.bhauman/rebel-readline "0.1.2-SNAPSHOT"]
:dependencies [[com.bhauman/rebel-readline "0.1.2"]
[org.clojure/clojurescript "1.9.946"]
[cljs-tooling "0.2.0"]]

Expand Down
12 changes: 12 additions & 0 deletions rebel-readline/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 0.1.2 Vi improvements and key binding configuration

* Fixed PrintWriter->on name collision warning for Clojure 1.9
* Added additional vi like bindings for clojure actions to :vi-cmd key map
* make readline history file project local
* make it easier to alter-var-root core repls to rebel-readline repls
* fix blow up when COLORFGBG isn't formatted correctly
* fix repl key-map swtiching feedback
* add a clojure-force-accept-line widget that submits a line regardless
* allow key binding configuration in the rebel_readline.edn config file

# 0.1.1 Initial release
41 changes: 36 additions & 5 deletions rebel-readline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you want to try this really quickly
and then invoke this:

```shell
clojure -Sdeps "{:deps {com.bhauman/rebel-readline {:mvn/version \"0.1.1\"}}}" -m rebel-readline.main
clojure -Sdeps "{:deps {com.bhauman/rebel-readline {:mvn/version \"0.1.2\"}}}" -m rebel-readline.main
```

That should start a Clojure REPL that takes its input from the Rebel readline editor.
Expand All @@ -50,19 +50,20 @@ Alternatively you can specify an alias in your `$HOME/.clojure/deps.edn`
```clojure
{
...
:aliases {:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.1"}}}
:aliases {:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.2"}}
:main-opts ["-m" "rebel-readline.main"]}}
}
```

And then run with a simpler:

```shell
$ clojure -R:rebel -m rebel-readline.main
$ clojure -A:rebel
```

#### Leiningen

Add `[com.bhauman/rebel-readline "0.1.1"]` to the dependencies in your
Add `[com.bhauman/rebel-readline "0.1.2"]` to the dependencies in your
`project.clj` then start a REPL like this:

```shell
Expand All @@ -74,7 +75,7 @@ Alternatively, you can add rebel-readline globally to `$HOME/.lein/profiles.clj`
```clojure
{
...
:user {:dependencies [[com.bhauman/rebel-readline "0.1.1"]]}
:user {:dependencies [[com.bhauman/rebel-readline "0.1.2"]]}
}
```

Expand Down Expand Up @@ -139,8 +140,38 @@ following options:
:redirect-output - boolean, rebinds root *out* during read to protect linereader
Defaults to true
:key-bindings - map of key-bindings that get applied after all other key
bindings have been applied
```

#### Key binding config

You can configure key bindings in the config file, but your milage may vary.

Example:

```
{
...
:key-bindings { :emacs [["^D" :clojure-doc-at-point]]
:viins [["^J" :clojure-force-accept-line]] }
}
```

Serialized keybindings are tricky and the keybinding strings are translated with
`org.jline.keymap.KeyMap/translate` which is a bit peculiar in how it translates things.

If you want literal characters you can use a list of chars or ints i.e
`(\\ \d)` instead of the serialized key names. So you can use `(4 4)` inplace of `"^D^D"`.

The best way to look up the available widget names is to use the `:repl/key-bindings`
command at the REPL prompt.

Note: I have found that JLine handles control characters and
alphanumeric characters quite well but if you want to bind special
characters you shouldn't be surprised if it doesn't work that well.

## Quick Lay of the land

You should look at `rebel-readline.clojure.main` and `rebel-readline.core`
Expand Down
2 changes: 1 addition & 1 deletion rebel-readline/project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject com.bhauman/rebel-readline "0.1.2-SNAPSHOT"
(defproject com.bhauman/rebel-readline "0.1.2"
:description "Terminal readline library for Clojure dialects"
:url "https://github.com/bhauman/rebel-readline"
:license {:name "Eclipse Public License"
Expand Down

0 comments on commit ae999ca

Please sign in to comment.