# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
github.setup jonmosco kube-ps1 0.7.0 v
maintainers {breun.nl:nils @breun} openmaintainer
description Kubernetes prompt info for bash and zshl
long_description A script that lets you add the current Kubernetes context and namespace \
configured on kubectl to your Bash/Zsh prompt strings (i.e. the \$PS1).
checksums rmd160 0f67b76aa77ca7acbed74700d55e378dc9d3e09f \
sha256 089bed64824784c282837f89f8708ec86d661afe4a8cd2b7bdcb16c2d11ac0e8 \
depends_run path:${prefix}/bin/kubectl:kubectl-1.15
xinstall -m 755 -d ${destroot}${prefix}/share/${name}
copy ${worksrcpath}/CHANGELOG.md \
${worksrcpath}/CONTRIBUTING.md \
${worksrcpath}/kube-ps1.sh \
${worksrcpath}/README.md \
${destroot}${prefix}/share/${name}
Source the kube-ps1.sh script and then use the kube_ps1 function in your shell prompt definition:
Bash example (~/.bashrc):
source ${prefix}/share/${name}/kube-ps1.sh
PS1=\'\$(kube_ps1)\'\$PS1
source ${prefix}/share/${name}/kube-ps1.sh
PROMPT=\'\$(kube_ps1)\'\$PROMPT