diff options
Diffstat (limited to '.bash_profile')
| -rw-r--r-- | .bash_profile | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/.bash_profile b/.bash_profile index 959da38..7381c73 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,2 +1,31 @@ -export EDITOR=vim -export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$PATH +export PATH=/Applications/Emacs.app/Contents/MacOS/:/Applications/Emacs.app/Contents/MacOS/bin:${PATH} +export PATH=${HOME}/.local/bin:${PATH} +export PATH=${HOME}/.idris2/bin:${PATH} +export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH" +export GOPATH=${HOME}/go +alias ec="emacsclient -c" +alias g=git + +# from https://stackoverflow.com/questions/18880024/start-ssh-agent-on-login +SSH_ENV="$HOME/.ssh/environment" + +function start_agent { + echo "Initialising new SSH agent..." + /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" + echo succeeded + chmod 600 "${SSH_ENV}" + . "${SSH_ENV}" > /dev/null + /usr/bin/ssh-add; +} + +# Source SSH settings, if applicable + +if [ -f "${SSH_ENV}" ]; then + . "${SSH_ENV}" > /dev/null + #ps ${SSH_AGENT_PID} doesn't work under cywgin + ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { + start_agent; + } +else + start_agent; +fi |
