From 44349064f75616fd47194425e27f5cb1d6ef5ecb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 9 Oct 2020 22:02:00 +0200 Subject: [PATCH] nix develop: Source ~/.bashrc Fixes #4104. --- src/nix/develop.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nix/develop.cc b/src/nix/develop.cc index a46ea39b6..f763e8ba0 100644 --- a/src/nix/develop.cc +++ b/src/nix/develop.cc @@ -377,6 +377,10 @@ struct CmdDevelop : Common, MixEnvironment script += fmt("exec %s\n", concatStringsSep(" ", args)); } + else { + script += "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;\n"; + } + writeFull(rcFileFd.get(), script); stopProgressBar();