Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Proposal: IEx prompt functions

154 views
Skip to first unread message

Anderson Cook

unread,
Sep 18, 2024, 2:55:05 PM9/18/24
to elixir-lang-core
Currently IEx allows configuration of various prompts as strings, I was curious if we wanted to allow configured nullary functions to return a string instead. This would allow users to configure their own function to add things like timestamps to their prompts.

ex:
```elixir
config :iex, default_prompt: fn -> "#{DateTime.to_string(DateTime.utc_now())} %prefix(%counter)" end
```

I'd also be interested in adding timing data between executions to the prompt, but that would require a different change.
Reply all
Reply to author
Forward
0 new messages