summaryrefslogtreecommitdiff
path: root/dot/bashrc
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2015-10-04 16:28:03 +0200
committerAndrew Cady <d@jerkface.net>2015-10-04 16:28:03 +0200
commitc25e51572f7fa61b720cd1fcfb9f8ddaf0adc917 (patch)
treed9e021048b052f2d4e6292db6edf9e75bda4d2df /dot/bashrc
parent2ea5eb5415341de3e5b0a92ffb9779207e2bfdaf (diff)
fixed ghc/ghci/runghc on $PATH
Diffstat (limited to 'dot/bashrc')
-rw-r--r--dot/bashrc19
1 files changed, 18 insertions, 1 deletions
diff --git a/dot/bashrc b/dot/bashrc
index 38ee097..226276a 100644
--- a/dot/bashrc
+++ b/dot/bashrc
@@ -36,11 +36,28 @@ memoize_retval()
36 done 36 done
37 } 37 }
38 38
39 add_stack_binpath()
40 {
41 local result="$( stack path 2>&1 | while read x y
42 do
43 if [ "$x" = "bin-path:" ]
44 then
45 printf %s "$y"
46 break
47 fi
48 done
49 )"
50 [ "$result" ] && PATH=$result
51 }
52
39### bash settings, general environment ### 53### bash settings, general environment ###
40 54
41 add_path -a /usr/games 55 add_path -a /usr/games
42 add_path "$HOME/.cabal/bin" "$HOME/.local/bin" "$HOME/bin" 56 add_path "$HOME/.cabal/bin" "$HOME/.local/bin" "$HOME/bin"
43# add_path "/home/d/.stack/programs/i386-linux/ghc-7.10.1/bin/" 57
58 if have stack; then
59 add_stack_binpath
60 fi
44 61
45 if match_glob "*zsh" "$SHELL"; then 62 if match_glob "*zsh" "$SHELL"; then
46 autoload -U select-word-style 63 autoload -U select-word-style