Skip to content

Instantly share code, notes, and snippets.

@marcoy
Last active August 29, 2015 14:02
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 marcoy/bbf772b6fda6cc17cccd to your computer and use it in GitHub Desktop.
Save marcoy/bbf772b6fda6cc17cccd to your computer and use it in GitHub Desktop.
.ghci
: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