4

Is there any why to clear the erlang screen with Ctrl+L like shortcut?

Fabrizio
  • 7,603
  • 6
  • 44
  • 104

1 Answers1

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
    how can I bypass **Ctrl-G** from **rlwrap** to erlang? – Sreekanth Nagareddy Jun 29 '16 at 12:28
  • @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