ghci configuration file

HaskellGhci

Haskell Problem Overview


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> ".

Haskell Solutions


Solution 1 - Haskell

Have you tried adding :set prompt "ghci> " to ~/.ghci?

Solution 2 - Haskell

Having applied @hvr's answer I got the following warning:

*** WARNING: ~/.ghci is writable by someone else, IGNORING!

The solution is chmod g-w ~/.ghci.

Solution 3 - Haskell

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.

Solution 4 - Haskell

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionrturradoView Question on Stackoverflow
Solution 1 - HaskellhvrView Answer on Stackoverflow
Solution 2 - HaskellsjakobiView Answer on Stackoverflow
Solution 3 - HaskelleigenfieldView Answer on Stackoverflow
Solution 4 - HaskellAbhinavView Answer on Stackoverflow