Is there any why to clear the erlang screen with Ctrl+L like shortcut?
Asked
Active
Viewed 675 times
4
-
Possible duplicate of [How do I reset/clear erlang terminal](http://stackoverflow.com/questions/37829916/how-do-i-reset-clear-erlang-terminal) – A. Sarid Jun 29 '16 at 06:39
-
Is there any possibility of using Ctr-L to clear the terminal? – Sreekanth Nagareddy Jun 29 '16 at 06:46
-
1You can use command+k, command+L will be used to clear one line at a time. – Hare Kumar Jun 29 '16 at 10:40
-
1is **command** is __Ctr__?, It's not working for me – Sreekanth Nagareddy Jun 29 '16 at 12:35
1 Answers
4
Use rlwrap -a erl
command.
rlwrap
is completely transparent to Erlang shell in case of user character input and it wraps them with readline that provides line-editing and history capabilities for interactive programs with a command-line interface like erl
.
Note that in a case of using commands like Ctrl+g or Tab for name completion, rlwrap
doesn't pass it to Erlang shell.

Hynek -Pichi- Vychodil
- 26,174
- 5
- 52
- 73

Hamidreza Soleimani
- 2,504
- 16
- 19
-
1
-
@SreekanthNagareddy Unfortunately **rlwrap** doesn't let you use Erlang's job handler with **Ctrl-G**. Also it doesn't let you use tab completion. – Hamidreza Soleimani Jun 29 '16 at 14:30
-
1@HamidrezaSoleimani: Which effectively disprove _completely transparent_ claim of yours. – Hynek -Pichi- Vychodil Jun 29 '16 at 15:42
-
@Hynek-Pichi-Vychodil In case of user character input it is completely transparent, but when it come to using commands with and key bindings, no it is not. Thanks for clarifying and I made the answer clearer. – Hamidreza Soleimani Jun 29 '16 at 17:47
-
2[I have extended](https://github.com/hanslub42/rlwrap/commit/bb8034e3e4b5e63162ed834082d3c8054c85eb9f) `rlwrap` to allow keypresses like CTRL-G to go directly to the rlwrapped command, bypassing the line editor. For this to work, you need to add `"\C-g": rlwrap-direct-keypress ` to `~/.inputrc` (and the latest `rlwrap` from [Github](https://github.com/hanslub42/rlwrap), of course) This won't help with tab completion, however ([Here's](http://stackoverflow.com/questions/9210931/is-there-a-way-of-running-rlwrap-with-tab-completion-disabled) why) – Hans Lub Jul 19 '16 at 09:31