Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-shell does not handle Mac OS Terminal session history correctly #9893

Open
equationcrunchor opened this issue Jan 31, 2024 · 0 comments
Open
Labels
bug macos Nix on macOS, aka OS X, aka darwin nix-shell nix-shell, nix develop, nix print-dev-env, etc

Comments

@equationcrunchor
Copy link

Describe the bug
Opening a nix-shell in the Terminal console creates a shell which loads session history from ~/.bash_history, but appends new commands to the specific session history file in ~/.bash_sessions/`. The result is that you can't access your previous commands in the nix-shell like you usually can in a shell.

A workaround is to set SHELL_SESSION_HISTORY to 0 in the .bashrc to disable the unique session history feature.

Steps To Reproduce

  1. Open Terminal on Mac OS.
  2. Open a new nix-shell.
  3. Enter some commands.
  4. Exit the nix-shell.
  5. Re-enter nix-shell. Attempt to access commands from previous session history. They will not be present.

Expected behavior

I should be able to access my session history from previous sessions.

nix-env --version output

nix-env (Nix) 2.10.2

Additional context

Terminal Version 2.14 (254)
macOS Sonoma 14.3
Apple M1 Pro

Priorities

Add 👍 to issues you find important.

@roberth roberth added macos Nix on macOS, aka OS X, aka darwin nix-shell nix-shell, nix develop, nix print-dev-env, etc labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug macos Nix on macOS, aka OS X, aka darwin nix-shell nix-shell, nix develop, nix print-dev-env, etc
Projects
None yet
Development

No branches or pull requests

2 participants