Last active
January 17, 2021 16:24
-
-
Save tioxy/f06604c4ef9181c3016975a4b8a45252 to your computer and use it in GitHub Desktop.
.bashrc
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
# | |
# ~/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
__kube_ps1() | |
{ | |
# Get current context | |
CONTEXT=$(kubectl config current-context) | |
if [ -n "$CONTEXT" ]; then | |
echo "(k8s: ${CONTEXT})" | |
fi | |
} | |
# PS1's | |
# 'tioxy' | |
export PS1="\n\[\033[38;5;226m\]\u\[$(tput sgr0)\]\[\033[38;5;141m\]@\h\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;51m\][\w]\[$(tput sgr0)\]\[\033[38;5;15m\]\$(parse_git_branch) \\e[34m\$(__kube_ps1) \e[97m\n\\$ \[$(tput sgr0)\]" | |
# 'root' | |
#export PS1="\n\[\033[38;5;9m\]\u\[$(tput sgr0)\]\[\033[38;5;141m\]@\h\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;51m\][\w]\[$(tput sgr0)\]\[\033[38;5;15m\]\$(parse_git_branch) \\e[34m\$(__kube_ps1) \e[97m\n\\$ \[$(tput sgr0)\]" | |
alias ls='ls --color=auto' | |
alias ll='ls --color=auto -lah --group-directories-first' | |
BROWSER=firefox | |
EDITOR=vim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment