about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-14T13·20+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-14T13·28+0200
commitc1994fecf9f9ea129f6164db92ad242e392d987c (patch)
treed534010bc68f04449f209aa3b9a0c689b39323c8 /scripts
parent672c3acc7109a84abeae3d28dc907132f2bad953 (diff)
nix-shell: Fix bash completion
Nixpkgs's stdenv setup script sets the "nullglob" option, but doing so
breaks Bash completion on NixOS (when ‘programs.bash.enableCompletion’
is set) and on Ubuntu.  So clear that flag afterwards.  Of course,
this may break stdenv functions in subtle ways...
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nix-build.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index d7805f83c3f5..3b5b8413c823 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -210,6 +210,7 @@ foreach my $expr (@exprs) {
             'set +e; ' .
             'PS1="\n\[\033[1;32m\][nix-shell:\w]$\[\033[0m\] "; ' .
             'unset NIX_ENFORCE_PURITY; ' .
+            'shopt -u nullglob; ' .
             $envCommand);
         exec($ENV{NIX_BUILD_SHELL} // "bash", "--rcfile", $rcfile);
         die;