From c1994fecf9f9ea129f6164db92ad242e392d987c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 14 Oct 2013 15:20:45 +0200 Subject: nix-shell: Fix bash completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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... --- scripts/nix-build.in | 1 + 1 file changed, 1 insertion(+) 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; -- cgit 1.4.1