summaryrefslogtreecommitdiff
path: root/.bash_profile
diff options
context:
space:
mode:
authorArnaud Bailly <arnaud.oqube@gmail.com>2019-09-07 10:27:18 +0200
committerArnaud Bailly <arnaud.oqube@gmail.com>2019-09-07 10:27:18 +0200
commitcd4c8103de6e57068d947f3efe94d82368e076be (patch)
treeb4576fd850ea23767baad1a24bc34c0b7473f128 /.bash_profile
parent004db3ecd099c8377e096b4be45eab92d25787ce (diff)
parent36b5878a953598ba62cc8720c7cd0cd5c07f46d5 (diff)
downloaddotfiles-cd4c8103de6e57068d947f3efe94d82368e076be.tar.gz
Merge branch 'master' of github.com:abailly/dotfiles
Diffstat (limited to '.bash_profile')
-rw-r--r--.bash_profile33
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