ghci configuration file

Viewed 9245

I'm using ghci 6.8.2 on Ubuntu. Does ghci use a configuration file where we can do some initial setup?. E.g.: :set prompt "ghci> ".

4 Answers

In my ~/.ghci configuration file. I have the following line:

:set prompt "\ESC[0;34m\STX%s\n\ESC[1;31m\STXλ> \ESC[m\STX"

And here is how my ghci prompt looks like:

https://asciinema.org/a/Tpk5430dPqCRN0cFqi1ucaCb8

In that config file, I temporarily commented out :set +m.

In @truthadjustr's answer the prelude comes every time you run any command.

:set prompt "\ESC[1;31m\STXλ> \ESC[m\STX"

This command solves the problem.

Related