summaryrefslogtreecommitdiff
path: root/dot/bashrc
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-09-12 19:31:45 -0400
committerAndrew Cady <d@jerkface.net>2016-09-12 19:31:45 -0400
commit84d51e16441330282bd06a028507561d7243303f (patch)
treeed587d4061fd4240ca2aeba1eb2a892fd5467c84 /dot/bashrc
parent4b382b12b88d4abdde382d06921c60d21cff204c (diff)
avoid duplicating expensive call to "stack path"
Diffstat (limited to 'dot/bashrc')
-rw-r--r--dot/bashrc3
1 files changed, 2 insertions, 1 deletions
diff --git a/dot/bashrc b/dot/bashrc
index 9b257b6..c289c5f 100644
--- a/dot/bashrc
+++ b/dot/bashrc
@@ -40,6 +40,7 @@ memoize_retval()
40 40
41 add_stack_binpath() 41 add_stack_binpath()
42 { 42 {
43 [ "$STACK_PATH_HAS_BEEN_SET" ] && return
43 local result="$( stack path 2>&1 | while read k v 44 local result="$( stack path 2>&1 | while read k v
44 do 45 do
45 case "$k" in 46 case "$k" in
@@ -51,7 +52,7 @@ memoize_retval()
51 esac 52 esac
52 done 53 done
53 )" 54 )"
54 [ "$result" ] && eval "$result" 55 [ "$result" ] && eval "$result" && export STACK_PATH_HAS_BEEN_SET=y
55 } 56 }
56 57
57### bash settings, general environment ### 58### bash settings, general environment ###