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

zsh HISTFILE is exported when it should not be #60355

Closed
ivan opened this issue Apr 28, 2019 · 1 comment
Closed

zsh HISTFILE is exported when it should not be #60355

ivan opened this issue Apr 28, 2019 · 1 comment

Comments

@ivan
Copy link
Member

ivan commented Apr 28, 2019

Issue description

The nixpkgs zsh module

# Don't export these, otherwise other shells (bash) will try to use same histfile
SAVEHIST=${toString cfg.histSize}
HISTSIZE=${toString cfg.histSize}
HISTFILE=${cfg.histFile}
wants HISTFILE to not be exported, but HISTFILE is already exported at that point.

Steps to reproduce

Start a bash shell and observe zsh history get clobbered.

or

Run typeset -p HISTFILE and observe an export HISTFILE=...

or

Add typeset -p HISTFILE || true early to

''
# /etc/zshrc: DO NOT EDIT -- this file has been generated automatically.
and observe export HISTFILE=/dev/null.

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

  • system: "x86_64-linux"
  • host os: Linux 4.19.37-hardened, NixOS, 19.09.git.2f96f26 (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • channels(root): "nixos-18.09.1922.97e0d53d669"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@ivan
Copy link
Member Author

ivan commented Apr 29, 2019

I kept observing an exported HISTFILE because it was still exported in the parent process. Killed tmuxes, logged out, and it's fine now.

@ivan ivan closed this as completed Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant