aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-05-18 11:31:52 +0200
committerGitHub <noreply@github.com>2021-05-18 11:31:52 +0200
commitde77d1b9243da9538c605f824728fb414c789067 (patch)
treec69b141cd29b5c62d8bc1c3c353d405fb5b742aa /src/nix
parent72356a94f9e67db3e768668e4cc73a86915fc68d (diff)
parent5fd8cf76676a280ae2b7a86ddabc6b14b41ebfe5 (diff)
Merge pull request #4827 from matthewbauer/run-bashrc-first-in-nix-develop
Source bashrc first in nix develop
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/develop.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index 2b64d9a31..10f843651 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -395,7 +395,7 @@ struct CmdDevelop : Common, MixEnvironment
if (verbosity >= lvlDebug)
script += "set -x\n";
- script += fmt("rm -f '%s'\n", rcFilePath);
+ script += fmt("command rm -f '%s'\n", rcFilePath);
if (phase) {
if (!command.empty())
@@ -414,7 +414,7 @@ struct CmdDevelop : Common, MixEnvironment
}
else {
- script += "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;\n";
+ script = "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;\n" + script;
if (developSettings.bashPrompt != "")
script += fmt("[ -n \"$PS1\" ] && PS1=%s;\n", shellEscape(developSettings.bashPrompt));
if (developSettings.bashPromptSuffix != "")