summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-11-05 05:08:52 +0100
committertv <tv@shackspace.de>2014-11-05 05:08:52 +0100
commit897b524889100a70123b3a4a513222f44cc0c19b (patch)
treedb91f73b282ca3625ddeba52f41b7945a47b07d1
parent250e9a5734e519632ae8920b9a76f40794a933a0 (diff)
env.nix: export HISTFILE only if ~/.history exists
-rw-r--r--env.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/env.nix b/env.nix
index 55d735c..0377835 100644
--- a/env.nix
+++ b/env.nix
@@ -10,7 +10,9 @@ let
];
extraCmds = ''
- export HISTFILE="\$HOME/.history/env-${name}"
+ if test -d "\$HOME/.history"; then
+ export HISTFILE="\$HOME/.history/env-${name}"
+ fi
$(grep export ${hsEnv.outPath}/bin/ghc)
'';