mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +00:00
keychain: set SHELL correctly in bash and zsh
bash and zsh apparently handle command substitution slightly differently than fish. in bash/zsh: $ export FOO=x $ FOO=y echo $(sh -c 'echo $FOO') x whereas in fish: $ export FOO=x $ FOO=y echo $(sh -c 'echo $FOO') y so we have to assign $SHELL within the substitution for bash and zsh.
This commit is contained in:
parent
602f2ce59c
commit
241a375f49
1 changed files with 2 additions and 2 deletions
|
@ -100,13 +100,13 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||
SHELL=bash eval "$(${shellCommand})"
|
||||
eval "$(SHELL=bash ${shellCommand})"
|
||||
'';
|
||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||
SHELL=fish eval (${shellCommand})
|
||||
'';
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
SHELL=zsh eval "$(${shellCommand})"
|
||||
eval "$(SHELL=zsh ${shellCommand})"
|
||||
'';
|
||||
xsession.initExtra = mkIf cfg.enableXsessionIntegration ''
|
||||
eval "$(${shellCommand})"
|
||||
|
|
Loading…
Reference in a new issue