mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 02:49:08 +00:00 
			
		
		
		
	use $TTY instead of $(tty); it's faster and more reliable
`tty` command infers the current TTY from file descriptor 0. `$TTY` gives current TTY directly. The latter works even when file descriptor 0 is redirected. It's also over 1000 times faster.
This commit is contained in:
		@@ -26,7 +26,7 @@ if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]];
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Inform gpg-agent of the current TTY for user prompts.
 | 
			
		||||
export GPG_TTY="$(tty)"
 | 
			
		||||
export GPG_TTY=$TTY
 | 
			
		||||
 | 
			
		||||
# Integrate with the SSH module.
 | 
			
		||||
if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user