Merge pull request #4827 from matthewbauer/run-bashrc-first-in-nix-develop

Source bashrc first in nix develop
This commit is contained in:
Eelco Dolstra 2021-05-18 11:31:52 +02:00 committed by GitHub
commit de77d1b924
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 != "")