Skip to content

bug: EDITOR and VISUAL are hardcoded when using prezto+zsh #2739

@Retrodynen

Description

@Retrodynen

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

Hi,

When using the below:

programs.zsh.prezto.enable = true;
home.sessionVariables.ALTERNATE_EDITOR = "emacs";
home.sessionVariables.EDITOR = "emacsclient -c";
home.sessionVariables.VISUAL = "emacsclient -c";
programs.zsh.envExtra = ''
export EDITOR='emacsclient -c'
export VISUAL='emacsclient -c'
'';

The EDITOR and VISUAL environment variables stay as 'nano' due to https://github.com/sorin-ionescu/prezto/blob/6c5657be8ef5f36054524ba171f254d5d9073e24/runcoms/zprofile#L20-L21

https://github.com/nix-community/home-manager/blob/master/modules/programs/zsh/prezto.nix#L354-L355

If I try envExtra or extraConfig.. the lines to change EDITOR and VISUAL are added to the top of the file which makes them useless as the hardcoded EDITOR=nano overrides it anyway :(

Maintainer CC

No response

System information

- system: `"x86_64-linux"`
 - host os: `Linux 5.15.22, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.6.0`
 - channels(root): `"home-manager, nixos"`
 - channels(syl): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions