ghci-configuratiebestand

Ik gebruik ghci 6.8.2 op Ubuntu. Gebruikt ghci een configuratiebestand waar we wat initiële instellingen kunnen doen?. Bijv.: :set prompt "ghci> "in.


Antwoord 1, autoriteit 100%

Heb je geprobeerd :set prompt "ghci> "toe te voegen aan ~/.ghci?


Antwoord 2, autoriteit 63%

Nadat ik het antwoord van @hvr had toegepast, kreeg ik de volgende waarschuwing:

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

De oplossing is chmod g-w ~/.ghci.


Antwoord 3

In mijn ~/.ghciconfiguratiebestand. Ik heb de volgende regel:

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

in

En zo ziet mijn ghciprompt eruit:

https://asciinema.org/a/Tpk5430dPqCRN0cFqi1ucaCb8

In dat configuratiebestand heb ik tijdelijk een commentaar gegeven op :set +m.


Antwoord 4

In @truthadjustr’s antwoordkomt de prelude elke keer dat je een opdracht uitvoert.

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

Deze opdracht lost het probleem op.

Other episodes