summary refs log tree commit diff
path: root/bashrc
diff options
context:
space:
mode:
authorFranck Cuny <franck@lumberjaph.net>2015-07-06 11:46:36 -0700
committerFranck Cuny <franck@lumberjaph.net>2015-07-06 11:46:36 -0700
commit3d10fafdfc888b43d91aebf45cb6022f4f3c3203 (patch)
tree61bd8c8475beaa5f86f2e78d1e4d3b7ea625eb84 /bashrc
parentcreate repository (diff)
downloademacs.d-3d10fafdfc888b43d91aebf45cb6022f4f3c3203.tar.gz
configuration files
Diffstat (limited to '')
-rw-r--r--bashrc73
1 files changed, 73 insertions, 0 deletions
diff --git a/bashrc b/bashrc
new file mode 100644
index 0000000..751f5e1
--- /dev/null
+++ b/bashrc
@@ -0,0 +1,73 @@
+export EDITOR="vim"
+export HISTFILE=
+export LANG="en_US.UTF-8"
+export LC_ALL="$LANG"
+export LC_CTYPE="$LANG"
+export PAGER="less"
+export TMPDIR="${HOME}/tmp"
+export TZ=America/Los_Angeles
+
+export PATH="$HOME/bin":"$HOME/.bin":"$PATH"
+
+[ -z "$PS1" ] && return
+
+# prompts
+export PS1="\w % "
+
+# limits
+ulimit -S -c 0
+
+# Set up ssh-agent
+SSH_ENV="$HOME/.ssh/environment"
+
+function start_agent {
+  if [[ -f "${HOME}/.ssh/id_rsa" ]]; then
+    echo "Initializing new GPG agent..."
+    touch $SSH_ENV
+    chmod 600 "${SSH_ENV}"
+    /usr/bin/ssh-agent | sed 's/^echo/#echo/' >> "${SSH_ENV}"
+    . "${SSH_ENV}" > /dev/null
+    /usr/bin/ssh-add
+  fi
+}
+
+# Source SSH settings, if applicable
+if [ -f "${SSH_ENV}" ]; then
+  . "${SSH_ENV}" > /dev/null
+  kill -0 $SSH_AGENT_PID 2>/dev/null || {
+    start_agent
+  }
+else
+  start_agent
+fi
+
+# some aliases
+if [[ "${OSTYPE}" =~ "darwin" ]]; then
+  alias ls='ls -G'
+else
+  alias ls='ls --color'
+fi
+
+alias cp="cp -i"
+alias l="ls"
+alias la="ls -a"
+alias ll="ls -lh"
+alias lt="ls -lhtr"
+alias mv="mv -i"
+alias rm="rm -i"
+
+alias e="$EDITOR"
+alias g="git"
+alias gclean="git clean -dfx"
+
+alias gerp="grep --color=auto"
+alias grep="grep --color=auto"
+
+alias pjson="python -mjson.tool"
+
+# tmux
+alias tmux='tmux -2'
+alias main='tmux a -t main'
+alias work='tmux new-session -A -s work'
+
+[ -f "${HOME}/.bash_local" ] && source "${HOME}/.bash_local"