Last active
July 14, 2022 06:49
-
-
Save lummie/76a2e8da260e2440afd383cf1f438e1a to your computer and use it in GitHub Desktop.
k8s, git, full path PS1 bash prompt
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
# install kube-ps1 from https://github.com/jonmosco/kube-ps1 | |
alias sn="kubectl config set-context --current --namespace" # switch namespace | |
# setup bash prompt | |
source "/usr/local/opt/kube-ps1/share/kube-ps1.sh" && k8s='$(kube_ps1)' # k8s cluster | |
export PS1="\n\n π¦" # headgehog | |
export PS1="$PS1\nβββββββ―β π° \t βββββββββββββββββββββββββ" # headgehog | |
export PS1="$PS1\nβ git β \$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/')" # git branch | |
export PS1="$PS1\nβ k8s β $k8s" # k8s info | |
export PS1="$PS1\nβ dir β \w" # full dir \n dir | |
export PS1="$PS1\nβββββββ·ββββββββββββββββββββββββββββββββββββββββββββββπ¦\n" # headgehog | |
export PS1="$PS1\n :\$ \[$(tput sgr0)\]" # :$ prompt then reset tput formatting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment