Created
November 9, 2023 12:40
-
-
Save mridulgain/7c386f7d1597cf06ff7ea8f2d2160ba7 to your computer and use it in GitHub Desktop.
My .bashrc additions
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
# go | |
export PATH=$PATH:$(go env GOPATH)/bin | |
# java | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
# kubebuilder autocompletion | |
if [ -f /usr/local/share/bash-completion/bash_completion ]; then | |
. /usr/local/share/bash-completion/bash_completion | |
fi | |
. <(kubebuilder completion bash) | |
# color codes | |
NORMAL="\[\e[00m\]" # Normal | |
BOLD="\[\e[1m\]" # Bold | |
BLACK="\[\e[0;30m\]" # Black | |
RED="\[\e[1;31m\]" # Red | |
GREEN="\[\e[0;32m\]" # Green | |
YELLOW="\[\e[0;33m\]" # Yellow | |
BLUE="\[\e[0;34m\]" # Blue | |
PURPLE="\[\e[0;35m\]" # Purple | |
CYAN="\[\e[0;36m\]" # Cyan | |
WHITE="\[\e[0;37m\]" # White | |
BOLD_GREEN="\[\e[1;32m\]" # Bold & Green | |
BOLD_BLUE="\[\e[1;34m\]" | |
# kubernetes context aware prompt | |
function kprompt() { | |
# https://github.com/jonmosco/kube-ps1 | |
source /home/avesha/local_lab/prompt/kube-ps1/kube-ps1.sh | |
# "$(kube_ps1)" -> function will be evaluated and assigned as a string, so the value is static | |
# '$(kube_ps1)' -> each time the assigned string is refered, the function will execute & thus returns dynamic value | |
# PS1="[$BOLD_GREEN\u@\h $CYAN\W $NORMAL$(kube_ps1)]\$ " | |
PS1='[\[\e[1;32m\]\u@\h \[\e[0;36m\]\W \[\e[00m\]$(kube_ps1)]\$ ' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment