{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nix/issues/730","repository_url":"https://api.github.com/repos/NixOS/nix","labels_url":"https://api.github.com/repos/NixOS/nix/issues/730/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nix/issues/730/comments","events_url":"https://api.github.com/repos/NixOS/nix/issues/730/events","html_url":"https://github.com/NixOS/nix/issues/730","id":120615008,"number":730,"title":"nix-shell doesn't work right with nixpkgs' own bash","user":{"login":"timbertson","id":14172,"avatar_url":"https://avatars.githubusercontent.com/u/14172?v=3","gravatar_id":"","url":"https://api.github.com/users/timbertson","html_url":"https://github.com/timbertson","followers_url":"https://api.github.com/users/timbertson/followers","following_url":"https://api.github.com/users/timbertson/following{/other_user}","gists_url":"https://api.github.com/users/timbertson/gists{/gist_id}","starred_url":"https://api.github.com/users/timbertson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbertson/subscriptions","organizations_url":"https://api.github.com/users/timbertson/orgs","repos_url":"https://api.github.com/users/timbertson/repos","events_url":"https://api.github.com/users/timbertson/events{/privacy}","received_events_url":"https://api.github.com/users/timbertson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-12-06T07:14:59Z","updated_at":"2016-04-28T11:03:51Z","closed_at":null,"body":"```\r\nbash-4.3$ nix-shell --pure -p nodejs-0_10\r\n[nix-shell:~]$\r\n```\r\n\r\n^ working shell\r\n\r\nBut if I use nixpkgs' own bash:\r\n\r\n```\r\nbash-4.3$ nix-build --no-out-link -A bash '<nixpkgs>'\r\n/nix/store/xag5ayq906w9zhlxs8wayv4kvpiyqphq-bash-4.3-p42\r\nbash-4.3$ env PATH=\"/nix/store/xag5ayq906w9zhlxs8wayv4kvpiyqphq-bash-4.3-p42/bin/:$PATH\" nix-shell --pure -p nodejs-0_10\r\nbash: shopt: progcomp: invalid shell option name\r\nbash: complete: command not found...\r\n\r\n\\[\\][nix-shell:~]$\\[\\]\r\n```\r\n\r\n^ weird prompt, no readline support, errors printed\r\n\r\nThis happens reliably when you run `nix-shell` from inside `nix-shell`, since most derivations implicitly rely on bash. I run into it all the time when I run `nix-shell` from a dir where I'm using `direnv` to set up project-specific dependencies, since that acts a lot like `nix-shell`.\r\n\r\nI'm not really sure what the right fix is, but I can think of a few options:\r\n\r\n - have `nix-shell` explicitly invoke `pkgs.bashInteractive` rather than whatever's available on `$PATH`. I think it should do this by default if possible, but it could also be behind a flag\r\n - have `nix-shell` invoke the first `bash` on `$PATH` which wasn't compiled with `--disable-readline` (although this may not even be possible)\r\n - have `nix-shell` accept an explicit path-to-bash argument so that it doesn't have to do either of the above (requires most work from the user though)"},"comment":{"url":"https://api.github.com/repos/NixOS/nix/issues/comments/215389787","html_url":"https://github.com/NixOS/nix/issues/730#issuecomment-215389787","issue_url":"https://api.github.com/repos/NixOS/nix/issues/730","id":215389787,"user":{"login":"timbertson","id":14172,"avatar_url":"https://avatars.githubusercontent.com/u/14172?v=3","gravatar_id":"","url":"https://api.github.com/users/timbertson","html_url":"https://github.com/timbertson","followers_url":"https://api.github.com/users/timbertson/followers","following_url":"https://api.github.com/users/timbertson/following{/other_user}","gists_url":"https://api.github.com/users/timbertson/gists{/gist_id}","starred_url":"https://api.github.com/users/timbertson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbertson/subscriptions","organizations_url":"https://api.github.com/users/timbertson/orgs","repos_url":"https://api.github.com/users/timbertson/repos","events_url":"https://api.github.com/users/timbertson/events{/privacy}","received_events_url":"https://api.github.com/users/timbertson/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T11:03:51Z","updated_at":"2016-04-28T11:03:51Z","body":"@kc1212 `nix-shell` works fine from fish for me. I don't know what error you're getting (or what your NIX_PATH is set to), but I believe you should create a separate github issue with that information - this issue is about running nix-shell from within bash."}}