gpg-agent: use $TTY for zsh
This commit is contained in:
parent
a7117efb37
commit
b02843e229
|
@ -13,11 +13,16 @@ let
|
||||||
${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
|
${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||||
'';
|
'';
|
||||||
|
|
||||||
gpgInitStr = ''
|
gpgBashInitStr = ''
|
||||||
GPG_TTY="$(tty)"
|
GPG_TTY="$(tty)"
|
||||||
export GPG_TTY
|
export GPG_TTY
|
||||||
'' + optionalString cfg.enableSshSupport gpgSshSupportStr;
|
'' + optionalString cfg.enableSshSupport gpgSshSupportStr;
|
||||||
|
|
||||||
|
gpgZshInitStr = ''
|
||||||
|
GPG_TTY="$TTY"
|
||||||
|
export GPG_TTY
|
||||||
|
'' + optionalString cfg.enableSshSupport gpgSshSupportStr;
|
||||||
|
|
||||||
gpgFishInitStr = ''
|
gpgFishInitStr = ''
|
||||||
set -gx GPG_TTY (tty)
|
set -gx GPG_TTY (tty)
|
||||||
'' + optionalString cfg.enableSshSupport gpgSshSupportStr;
|
'' + optionalString cfg.enableSshSupport gpgSshSupportStr;
|
||||||
|
@ -256,8 +261,8 @@ in {
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration gpgInitStr;
|
programs.bash.initExtra = mkIf cfg.enableBashIntegration gpgBashInitStr;
|
||||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration gpgInitStr;
|
programs.zsh.initExtra = mkIf cfg.enableZshIntegration gpgZshInitStr;
|
||||||
programs.fish.interactiveShellInit =
|
programs.fish.interactiveShellInit =
|
||||||
mkIf cfg.enableFishIntegration gpgFishInitStr;
|
mkIf cfg.enableFishIntegration gpgFishInitStr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue