summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]bashrc38
1 files changed, 17 insertions, 21 deletions
diff --git a/bashrc b/bashrc
index 6b5ccf1..b2c206e 100644..100755
--- a/bashrc
+++ b/bashrc
@@ -12,7 +12,7 @@ export GOPATH="${HOME}/gocode"
 [ "${BASH_VERSINFO}" -gt 3 ] && shopt -s autocd
 
 # prompts
-export PS1="[\$(date -u '+%T %D')]\W % "
+export PS1="\W % "
 
 alias e="$EDITOR"
 alias et="emacsclient -nw"
@@ -25,24 +25,20 @@ alias lt="ls -lhtr"
 alias mv="mv -i"
 alias rm="rm -i"
 
-alias au="aurora"
-alias g="git"
-alias k="kubectl"
-
-# finally, build the path
-[ -d "${HOME}/bin" ] && PATH="${HOME}/bin:${PATH}"
-[ -d "${GOPATH}/bin" ] && PATH="${GOPATH}/bin:${PATH}"
-[ -d "${HOME}/src/source/dist" ] && PATH="${HOME}/src/source/dist:${PATH}"
-
-[ -f "/opt/google-cloud-sdk/path.bash.inc" ] && source "/opt/google-cloud-sdk/path.bash.inc"
-[ -f "/opt/google-cloud-sdk/completion.bash.inc" ] && source "/opt/google-cloud-sdk/completion.bash.inc"
-[ -d "/opt/twitter/opt/go/libexec/bin" ] && PATH="/opt/twitter/opt/go/libexec/bin:${PATH}"
-[ -d "/opt/twitter/bin" ] && PATH="/opt/twitter/bin:${PATH}"
-[ -f /opt/twitter/rvm/scripts/rvm ] && source /opt/twitter/rvm/scripts/rvm
-
-md_prev() {
-  FILE="${1}"
-  pandoc -f markdown_github \
-         -c https://goo.gl/OVmlwT \
-         --self-contained "${FILE}" > /tmp/md_prev && open /tmp/md_prev
+# finally, build the path and source a few files
+__add_to_path_if_exists() {
+  [ -d "$1" ] && export PATH="$1:$PATH"
 }
+
+__source_file_if_exists() {
+  [ -s "$1" ] && source "$1"
+}
+
+__add_to_path_if_exists "${HOME}/bin"
+__add_to_path_if_exists "${GOPATH}/bin"
+__add_to_path_if_exists "${HOME}/src/source/dist"
+__add_to_path_if_exists "/opt/twitter/opt/go/libexec/bin"
+__add_to_path_if_exists "/opt/twitter/bin"
+
+__source_file_if_exists "/opt/google-cloud-sdk/path.bash.inc"
+__source_file_if_exists  "/opt/google-cloud-sdk/completion.bash.inc"