Skip to content

Instantly share code, notes, and snippets.

@pyrtsa
Created October 19, 2012 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyrtsa/3916723 to your computer and use it in GitHub Desktop.
Save pyrtsa/3916723 to your computer and use it in GitHub Desktop.
Color your ghci prompt
-- Print the imported modules in green, then ">>> " on the following line.
:set prompt "\SOH\ESC[32m\STX%s\SOH\ESC[0m\STX\n\SOH\ESC[32;1m\STX>>>\SOH\ESC[0m\STX "
-- (Disclaimer: ghci doesn't currently support configuring the prompt on
-- continuation lines for multiline inputs, so you'll get something like
-- "Prelude|" instead of something convenient like a green "... ". Patches
-- welcome, I guess!)
@Chattille
Copy link

Chattille commented Jan 27, 2023

:set prompt-cont will work for continuation lines now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment