2011-06-25 17:37:31 +00:00
|
|
|
|
2011-06-25 20:23:38 +00:00
|
|
|
# PS1="\[\e]0;\@ [\u@\h] [\w]\007\]\[\e[1;33m\]\@ \[\e[1;37m\][\[\e[1;35m\]\u\[\e[1;37m\]@\[\e[1;32m\]\h\[\e[1;37m\]] \[\e[1;37m\][\[\e[1;31m\]\w\[\e[1;37m\]] [\[\e[1;36m\]$(ls -l | grep "^-" | wc -l | tr -d " ") \[\e[1;34m\]files\[\e[1;37m\]] \n\[\e[1;33m\]\@ \[\e[1;37m\]$ \[\e[0m\]"
|
2011-06-25 17:37:31 +00:00
|
|
|
|
2011-11-22 02:32:50 +00:00
|
|
|
export SHELL=/bin/bash
|
|
|
|
|
2018-03-19 19:06:45 +00:00
|
|
|
update_terminal_cwd() {
|
|
|
|
true;
|
|
|
|
}
|
|
|
|
|
2011-06-26 16:00:26 +00:00
|
|
|
set_prompt() {
|
2011-06-25 20:23:38 +00:00
|
|
|
local BLUE="\[\e[0;34m\]"
|
|
|
|
local DARK_BLUE="\[\e[1;34m\]"
|
|
|
|
local RED="\[\e[0;31m\]"
|
|
|
|
local DARK_RED="\[\e[1;31m\]"
|
|
|
|
local GREEN="\[\e[0;32m\]"
|
|
|
|
local NO_COLOR="\[\e[0m\]"
|
|
|
|
|
|
|
|
case $TERM in
|
|
|
|
xterm*|screen)
|
|
|
|
TITLEBAR='\[\e]0;\u@\h \w\007\]';
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
TITLEBAR="";
|
|
|
|
;;
|
|
|
|
esac
|
2011-06-25 17:37:31 +00:00
|
|
|
|
|
|
|
FAILURE_COLOR="if [[ \$? = '0' ]]; then echo \"$GREEN\"; else echo \"$RED\"; fi"
|
|
|
|
|
2011-06-26 01:55:40 +00:00
|
|
|
PS1="${TITLEBAR}$BLUE[\t]\`$FAILURE_COLOR\` \u@\h> $NO_COLOR"
|
2011-06-25 17:37:31 +00:00
|
|
|
}
|
|
|
|
|
2016-12-03 17:42:44 +00:00
|
|
|
restart_network_manager() {
|
|
|
|
sudo service network-manager restart
|
|
|
|
}
|
|
|
|
|
2011-11-22 02:26:43 +00:00
|
|
|
# sets the PS1 prompt
|
2011-06-26 03:03:37 +00:00
|
|
|
set_prompt
|
2011-06-25 17:37:31 +00:00
|
|
|
|
2011-06-28 00:00:15 +00:00
|
|
|
# makes ls print pretty
|
2017-09-15 14:49:29 +00:00
|
|
|
#alias ls="ls --color=auto"
|
|
|
|
# TODO: make this work on both platforms
|
|
|
|
alias ls="ls -G"
|
2015-09-08 15:24:29 +00:00
|
|
|
|
2018-06-08 13:36:46 +00:00
|
|
|
alias notes="vim ~/notes.md"
|
|
|
|
|
2011-06-28 00:00:15 +00:00
|
|
|
# default editor
|
|
|
|
export EDITOR=vim
|
|
|
|
|
|
|
|
# set history
|
|
|
|
export HISTSIZE=1000
|
|
|
|
export HISTFILESIZE=1000
|
2015-09-08 15:15:58 +00:00
|
|
|
export HISTCONTROL=ignoredups,erasedups
|
|
|
|
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
|
|
|
|
shopt -s histappend
|
2011-06-28 00:00:15 +00:00
|
|
|
|
2011-11-22 02:26:43 +00:00
|
|
|
# disable messaging
|
2012-04-21 23:13:09 +00:00
|
|
|
if `tty -s`; then
|
|
|
|
mesg n
|
|
|
|
fi
|
2011-11-22 02:26:43 +00:00
|
|
|
|
2015-09-08 15:15:58 +00:00
|
|
|
alias href="history -a; history -c; history -r"
|
2012-07-25 14:32:57 +00:00
|
|
|
|
2017-03-13 15:49:52 +00:00
|
|
|
export PATH=$PATH:~/.bin
|
2014-09-26 03:17:00 +00:00
|
|
|
export HISTCONTROL=ignorespace
|
2016-02-17 04:24:45 +00:00
|
|
|
export TERM=xterm-256color
|
2016-02-04 04:42:28 +00:00
|
|
|
|
2017-03-13 15:49:52 +00:00
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
|
|
|
|
|
2017-09-13 02:15:25 +00:00
|
|
|
source $HOME/.asdf/asdf.sh
|
|
|
|
source $HOME/.asdf/completions/asdf.bash
|
|
|
|
|
2017-09-21 13:20:03 +00:00
|
|
|
source $HOME/.install/google-cloud-sdk/completion.bash.inc
|
|
|
|
source $HOME/.install/google-cloud-sdk/path.bash.inc
|
|
|
|
|
2018-03-12 16:01:41 +00:00
|
|
|
alias iex="iex --erl \"-kernel shell_history enabled\""
|
|
|
|
|
2018-06-08 13:36:46 +00:00
|
|
|
eval "$(pyenv init -)"
|
|
|
|
eval "$(pyenv virtualenv-init -)"
|
|
|
|
|
2017-09-15 14:49:29 +00:00
|
|
|
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
|
|
|
|
|