Last active
June 16, 2016 13:32
-
-
Save IcaroBichir/b6d68fcd4e7fb160748a to your computer and use it in GitHub Desktop.
.bash_profile or .bashrc
This file contains 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
#!/bin/bash | |
alias ll='ls -GFlaht' | |
source ~/.git-completion.bash | |
source ~/.git-prompt.sh | |
alias gits='git status' | |
MAGENTA="\[\033[0;35m\]" | |
YELLOW="\[\033[0;33m\]" | |
BLUE="\[\033[34m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
CYAN="\[\033[0;36m\]" | |
GREEN="\[\033[0;32m\]" | |
GIT_PS1_SHOWDIRTYSTATE=true | |
export LS_OPTIONS='--color=auto' | |
export CLICOLOR='Yes' | |
export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD | |
export PS1=$LIGHT_GRAY"\u@\h"'$( | |
if [[ $(__git_ps1) =~ \*\)$ ]] | |
# a file has been modified but not added | |
then echo "'$YELLOW'"$(__git_ps1 " (%s)") | |
elif [[ $(__git_ps1) =~ \+\)$ ]] | |
# a file has been added, but not commited | |
then echo "'$MAGENTA'"$(__git_ps1 " (%s)") | |
# the state is clean, changes are commited | |
else echo "'$CYAN'"$(__git_ps1 " (%s)") | |
fi)'$BLUE" \w"$GREEN": ${LIGHT_GRAY}" | |
function docker_clean_containers() { | |
docker ps -a | awk '{print $1}' | grep -v CONTAINER | while read container_id; do | |
docker kill ${container_id} | |
docker rm ${container_id} | |
done | |
} | |
function docker_clean_images() { | |
docker images | awk '{print $3}' | grep -v IMAGE | while read container_image; do | |
docker rmi ${container_image} | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment