PS1: just use $HOME/dev

This commit is contained in:
Motiejus Jakštys 2024-06-12 08:38:26 +03:00
parent 5015eb0f8f
commit 9be7416959

View File

@ -78,10 +78,11 @@
{id = "kgjfgplpablkjnlkjmjdecgdpfankdle";} # Zoom
];
bash.initExtra = ''
hm_ps1_extra() {
eval "''${MJ_PS1_EXTRA:-}"
mj_ps1_extra() {
if [[ $PWD =~ $HOME/dev ]]; then
kubectl config view --minify -o jsonpath={.current-context}:{..namespace}
}
export PS1=$(echo "$PS1" | sed 's;\\n;$(hm_ps1_extra);')
export PS1=$(echo "$PS1" | sed 's;\\n;$(mj_ps1_extra);')
'';
};
};