Last active
November 17, 2020 15:15
-
-
Save danielDevelops/9625c9c4ddafeebe9e11e09995e2de2d to your computer and use it in GitHub Desktop.
My Custom Bash Profile
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
#System-wide .bashrc file for interactive bash(1) shells. | |
export BASH_SILENCE_DEPRECATION_WARNING=1 | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
gray="\001\e[90m\002" | |
red="\001\e[1;31;40m\002" | |
green="\001\e[32m\002" | |
blue="\001\e[38;5;39m\002" | |
white="\001\e[m\002" | |
yellow="\001\e[93m\002" | |
PS1="" | |
if [ $(id -u) = 0 ]; then | |
PS1+="$red\u" | |
else | |
PS1+="$green\u" | |
fi | |
PS1+="$white@" | |
PS1+="$gray\h" | |
PS1+="$white:" | |
PS1+="$blue\w" | |
PS1+="$yellow\$(parse_git_branch)" | |
PS1+="$white$ " | |
export PS1 | |
alias ll='ls -lah' | |
function killit() | |
{ | |
toKill=$(ps -ef | grep -i $1 | grep -v grep | awk '{print $2}' | xargs | sed -e 's/ /,/g') | |
for i in $(echo $toKill | sed "s/,/ /g") | |
do | |
echo "Killing " $i | |
kill -9 $i | |
done | |
} | |
# Make bash check its window size after a process completes | |
shopt -s checkwinsize | |
[ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment