Interesting! So maybe a case could be made to the Erlang maintainers that 
the emacs-like char handling is a little broken and can be improved to 
match e.g. bash's. 

The other option I've found is to run iex from rlwrap. It should be 
configurable to capture ctrl- keypresses (like Ctrl-L), and send a text 
string (like clear) up to iex.



On Monday, October 14, 2019 at 12:58:39 PM UTC-7, Jonathan Arnett wrote:
>
> For what it's worth, bash also uses Emacs-style line editing. The 
> difference between bash and erl is that bash will exit when there's nothing 
> after the prompt and ctrl-d is received. When there is something after the 
> prompt, bash will either delete the following character, if it exists, or 
> ring the bell.
>
> As an emacs user, I recognize all the oddities of various forms of emacs 
> emulation 🙂
>
> Something I'll lob into this conversation as well is that erl has a `q()` 
> function that exits the shell. I'd love if IEx had a `q()` or `exit()` or 
> something of that nature.
>
>
> On Sunday, October 13, 2019 at 9:47:54 PM UTC-7, Robb Shecter wrote:
>>
>> Interesting - edlin.erl is implementing some emacs functions:
>>
>> https://github.com/erlang/otp/blob/master/lib/stdlib/src/edlin.erl#L22
>>
>> And ctrl-d actually has a function, which I didn't realize - as in emacs, 
>> to delete the character ahead of the cursor:
>>
>> https://github.com/erlang/otp/blob/master/lib/stdlib/src/edlin.erl#L189
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/add845d4-493c-4a8a-8de6-fbce5694550c%40googlegroups.com.

Reply via email to