Skip to content

nix-shell: messed up subshell #150

Closed

Description

@zefhemel

I've just installed a recent pre-release Nix build which has nix-shell (wooh!). However, when I run it on a project that I previously used with nix-build --run-env I get a weird looking shell with basic readline behavior broken:

[zef@nixbox:~/lb/lb-base]$ nix-shell
warning: you did not specify `--add-root'; the result might be removed by the garbage collector

\[\][nix-shell:~/lb/lb-base]$\[\]

Any idea what could be going on here? @edolstra

Activity

  1. edolstra commented on Jul 25, 2013

    @edolstra
    Member

    This indicates that "bash" in $PATH somehow resolves to a non-interactive bash (i.e. one without ncurses support). What does "which bash" say? It's also possible the derivation has a PATH attribute that includes bash, but that's usually not the case.

  2. zefhemel commented on Jul 25, 2013

    @zefhemel
    Author

    Alright indeed, there was some weird defunct bash version in my nix profile. Works fine now.

  3. added a commit that references this issue on Jan 1, 2024
  4. added a commit that references this issue on Jul 25, 2025
  5. added 8 commits that reference this issue on Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions