Rearrange GPG startup.

This commit is contained in:
David Tomaschik
2016-02-12 21:08:23 -08:00
parent 20581f766f
commit 87dc698f31
2 changed files with 18 additions and 18 deletions

View File

@@ -1,17 +1,15 @@
# Setup GPG Agent # Setup GPG Agent
GPG_AGENT_INFO_PATH=$HOME/.gnupg/gpg-agent-info-`hostname` if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then
if test -f $GPG_AGENT_INFO_PATH && kill -0 `cut -d: -f 2 $GPG_AGENT_INFO_PATH` 2>/dev/null ; then GPG_AGENT_INFO_PATH=$HOME/.gnupg/gpg-agent-info-`hostname`
. $GPG_AGENT_INFO_PATH if test -f $GPG_AGENT_INFO_PATH && kill -0 `cut -d: -f 2 $GPG_AGENT_INFO_PATH` 2>/dev/null ; then
export GPG_AGENT_INFO SSH_AUTH_SOCK SSH_AGENT_PID . $GPG_AGENT_INFO_PATH
else export GPG_AGENT_INFO SSH_AUTH_SOCK SSH_AGENT_PID
if which gpg-agent >/dev/null 2>&1 ; then else
gpg-agent -q 2>/dev/null || eval `gpg-agent --daemon --enable-ssh-support --write-env-file $GPG_AGENT_INFO_PATH` 2>/dev/null if which gpg-agent >/dev/null 2>&1 ; then
gpg-agent -q 2>/dev/null || eval `gpg-agent --daemon --enable-ssh-support --write-env-file $GPG_AGENT_INFO_PATH` 2>/dev/null
fi
fi fi
unset GPG_AGENT_INFO_PATH
export GPG_TTY=`tty`
fi fi
unset GPG_AGENT_INFO_PATH
export GPG_TTY=`tty`
# End GPG # End GPG
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

View File

@@ -20,11 +20,6 @@ esac
autoload -U colors && colors autoload -U colors && colors
PS1="%{%(!.$fg[red].$fg[green])%}%n%{$fg[white]%}@%{$fg[cyan]%}%m%{$fg[white]%}:%{$fg[green]%}%32<...<%~%<<%{$fg[white]%}%#%{$reset_color%} " PS1="%{%(!.$fg[red].$fg[green])%}%n%{$fg[white]%}@%{$fg[cyan]%}%m%{$fg[white]%}:%{$fg[green]%}%32<...<%~%<<%{$fg[white]%}%#%{$reset_color%} "
# .profile is universal
. ~/.profile
# Deduplicate the path
typeset -U path
# LS Colors # LS Colors
alias ls='ls --color' alias ls='ls --color'
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
@@ -40,6 +35,13 @@ if [ -d $HOME/.oh-my-zsh ] ; then
unset ZSH_CUSTOM unset ZSH_CUSTOM
fi fi
# .profile is universal
# but after oh-my-zsh to use anything setup there
. ~/.profile
# Deduplicate the path
typeset -U path
# Keybindings # Keybindings
bindkey '^[[A' history-search-backward bindkey '^[[A' history-search-backward
bindkey '^[[B' history-search-forward bindkey '^[[B' history-search-forward