mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
chore(kube-ps1): update to 7d575c6d
This commit is contained in:
parent
a07126330b
commit
05c9d8974e
2 changed files with 19 additions and 6 deletions
|
|
@ -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 |
|
||||
| :------- | :-----: | ------- |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue