mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 02:49:08 +00:00 
			
		
		
		
	Add a preexec hook to set the GPG-Agent TTY
Signed-off-by: Sorin Ionescu <sorin.ionescu@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Sorin Ionescu
					
				
			
			
				
	
			
			
			
						parent
						
							9539341e1e
						
					
				
				
					commit
					fc3f8025ea
				
			@@ -35,6 +35,12 @@ if grep 'enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
 | 
			
		||||
 | 
			
		||||
  # Load the SSH module for additional processing.
 | 
			
		||||
  pmodload 'ssh'
 | 
			
		||||
 | 
			
		||||
  # Updates the GPG-Agent TTY before every command since SSH does not set it.
 | 
			
		||||
  function _gpg-agent-update-tty {
 | 
			
		||||
    gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
 | 
			
		||||
  }
 | 
			
		||||
  add-zsh-hook preexec _gpg-agent-update-tty
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Clean up.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user