mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-19 07:38:28 +00:00
chore(kube-ps1): update to 7d575c6d (#13750)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
This commit is contained in:
2
.github/dependencies.yml
vendored
2
.github/dependencies.yml
vendored
@@ -30,7 +30,7 @@ dependencies:
|
||||
plugins/kube-ps1:
|
||||
repo: jonmosco/kube-ps1
|
||||
branch: master
|
||||
version: e19c9ee867c5655814c384a6bf543e330e6ef1b7
|
||||
version: 7d575c6d53f60130159a3db28e33d2967201cd64
|
||||
precopy: |
|
||||
set -e
|
||||
find . ! -name kube-ps1.sh ! -name LICENSE ! -name README.md -delete
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# kube-ps1: Kubernetes prompt for bash and zsh
|
||||
# kube-ps1: Kubernetes prompt for bash, zsh, and fish
|
||||
|
||||

|
||||
[](https://github.com/jonmosco/kube-ps1/actions/workflows/ci.yml)
|
||||
|
||||
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`).
|
||||
A script that lets you add the current Kubernetes context and namespace configured on `kubectl` to your Bash, Zsh, or Fish prompt.
|
||||
|
||||
Inspired by several tools used to simplify usage of `kubectl`.
|
||||
|
||||
@@ -77,6 +76,21 @@ source /path/to/kube-ps1.sh
|
||||
PS1='[\u@\h \W $(kube_ps1)]\$ '
|
||||
```
|
||||
|
||||
#### Fish
|
||||
|
||||
Add this to `~/.config/fish/config.fish`:
|
||||
|
||||
```fish
|
||||
source /path/to/kube-ps1.fish
|
||||
|
||||
function fish_prompt
|
||||
echo -n (kube_ps1) ' '
|
||||
# your existing prompt here
|
||||
end
|
||||
```
|
||||
|
||||
> Note: Fish users should source `kube-ps1.fish` instead of `kube-ps1.sh`.
|
||||
|
||||
## Requirements
|
||||
|
||||
The default prompt assumes you have the `kubectl` command line utility installed.
|
||||
@@ -184,8 +198,7 @@ If the font is not properly installed, and the glyph is not available, it will d
|
||||
|
||||
## Customization
|
||||
|
||||
The default settings can be overridden in `~/.bashrc` or `~/.zshrc` by setting
|
||||
the following variables:
|
||||
The default settings can be overridden in `~/.bashrc`, `~/.zshrc`, or `~/.config/fish/config.fish` by setting the following variables:
|
||||
|
||||
| Variable | Default | Meaning |
|
||||
| :------- | :-----: | ------- |
|
||||
|
||||
Reference in New Issue
Block a user