]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
zsh/rc: Use ghci with rlwrap if available.
authorSimon Ruderich <simon@ruderich.org>
Sat, 14 Jan 2012 14:35:18 +0000 (15:35 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sat, 14 Jan 2012 14:35:18 +0000 (15:35 +0100)
zsh/rc

diff --git a/zsh/rc b/zsh/rc
index 06e03f90f0e07dff468b7391bf90359b5277d11c..84b27f73a35887173f0a1df7131970f88f47dfbc 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -650,6 +650,15 @@ xpdf() {
     disown %command
 }
 
+# GHCI doesn't use readline, force it if rlwrap is available.
+(( $+commands[rlwrap] )) && ghci() {
+    command rlwrap \
+        --always-readline --complete-filenames -t dumb \
+        --histsize 5000 \
+        --file ~/.shell/rlwrap/ghci \
+        ghci "$@" 2>&1
+}
+
 
 # OS SPECIFIC SETTINGS