Kubernetes stuff.
[profile.git] / .ps1.d / k8s.ps1
diff --git a/.ps1.d/k8s.ps1 b/.ps1.d/k8s.ps1
new file mode 100644 (file)
index 0000000..d572afc
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bash
+
+# This part of the prompt is taken from k8s.bashrc.
+# It is shown only if __ps1_k8s is 1.  By default it is 0.
+
+__ps1_k8s=${__ps1_k8s:-0}
+__ps1_k8s_colour256="0;38;5;127"
+__ps1_k8s_colour88="0;38;5;49"
+__ps1_k8s_colour="0;35"
+
+function __ps1_k8s() {
+  [ "$__ps1_k8s" = "1" ] || return $1
+  __k8s "$(__ps1_prefix $1 __ps1_k8s)"
+  return $1
+}