Last active
August 29, 2015 14:02
-
-
Save marcoy/bbf772b6fda6cc17cccd to your computer and use it in GitHub Desktop.
.ghci
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:set prompt "\ESC[1;31m%s\n\ESC[0;33mλ> \ESC[m" | |
let ghciEscapeShellArg arg = "'" ++ concatMap (\x -> if x == '\'' then "'\"'\"'" else [x]) arg ++ "'" | |
:def! hoogle \str -> return $ ":! hoogle --count=15 \"" ++ str ++ "\"" | |
:def! search return . (":! hoogle --color --count=20 " ++) . ghciEscapeShellArg | |
:def! doc return . (":! hoogle --info " ++) . ghciEscapeShellArg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment