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

nixos: zsh: setopt prompt_sp to workaround a zsh bug #66992

Merged
merged 1 commit into from Aug 20, 2019

Conversation

oxij
Copy link
Member

@oxij oxij commented Aug 19, 2019

What? Why?

See #38535. I took the fix by @Mic92 and tested it in all the ttys and ptys I ever use. It seems to work.

Closes #38535.

git log

nix-instantiate environment

  • Host OS: Linux 4.9, SLNOS 19.09
  • Nix: nix-env (Nix) 2.2.2
  • Multi-user: yes
  • Sandbox: yes
  • NIXPKGS_CONFIG:
{
  checkMeta = true;
  doCheckByDefault = true;
}

nix-env -qaP diffs

  • On x86_64-linux: noop
  • On aarch64-linux: noop
  • On x86_64-darwin: noop

/cc @dtzWill

See NixOS#38535, properly fixing the prompt seems complicated, and this seems
to work in all the ttys I checked.

Suggested by @Mic92.
@matthewbauer
Copy link
Member

Should also fix #30121 I think.

@matthewbauer
Copy link
Member

This should be eligible for backporting as well.

md-magenta added a commit to neic/dotfiles that referenced this pull request Apr 6, 2023
A change was introduced in zsh [1] changing the default of PROMPT_SP
[2]. It did not however change the walter prompt [3] that nix formerly
used as default and nix-darwin still uses as default [4]. In nix it was
reported in [5] and fixed in [6]. In nix-darwin a fix have been made in
[7], but it is not merged.

A later change in nix [8] gives a hint that you should use `prompt off`
if overwriting your prompt in `.zshrc`.

[1] zsh-users/zsh@43e55a9
[2] https://zsh.sourceforge.io/Doc/Release/Options.html#Prompting
[3] https://github.com/zsh-users/zsh/blob/master/Functions/Prompts/prompt_walters_setup#L23
[4] https://github.com/LnL7/nix-darwin/blob/master/modules/programs/zsh/default.nix#:~:text=programs.zsh.promptInit
[5] NixOS/nixpkgs#30121
[6] NixOS/nixpkgs#66992
[7] LnL7/nix-darwin#488
[8] NixOS/nixpkgs@2eaf575
@oxij oxij deleted the nixos/fix-zsh-prompt branch August 12, 2023 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants