Created
April 7, 2016 00:38
-
-
Save sindbach/76293c76eac35b3ab03aa3c9baf7591f to your computer and use it in GitHub Desktop.
bashrc file for docker machine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# timer related | |
timer_start() { timer=${timer:-$SECONDS}; } | |
timer_stop() { timer_show=$((${SECONDS} - ${timer})); unset timer;} | |
BLUE="\[\033[0;36m\]" | |
NORMAL="\[\033[0m\]" | |
RED="\[\033[31;1m\]" | |
YELLOW="\[\033[0;33m\]" | |
ORANGE="\[\033[38;5;95;38;5;214m\]" | |
PURPLE="\[\033[38;5;95;38;5;128m\]" | |
BYELLOW="\[\033[33;1m\]" | |
BGREEN="\[\033[1;32m\]" | |
SMILEY="${BGREEN}:)${NORMAL}" | |
FROWNY="${RED}:(${NORMAL}" | |
SELECT="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi" | |
trap 'timer_start' DEBUG | |
PROMPT_COMMAND=timer_stop | |
PS1="\n${ORANGE}\u${NORMAL}@${PURPLE}\h${NORMAL} 🐳 > [${BYELLOW}\${timer_show}s${NORMAL}] ${YELLOW}\w${NORMAL}\n\A \`${SELECT}\` " | |
lgrep() { grep -R --exclude-dir='build' --color=always "$*" . | less -R; } | |
# remove duplicates in history | |
export HISTCONTROL="erasedups:ignoreboth" | |
# keep history | |
shopt -s histappend | |
# fix typos when changing dir | |
shopt -s cdspell | |
alias grep="grep --color=always" | |
export PIP_REQUIRE_VIRTUALENV=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment