mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-09-04 01:54:36 +00:00
Added example of using bash completion (#86)
Added example using bash completion. Example clones into `~/.kubectx` for people who don't want to make modifications outside of `$HOME`.
This commit is contained in:
committed by
Ahmet Alp Balkan
parent
41296a5fcf
commit
6811a5f03c
15
README.md
15
README.md
@@ -114,7 +114,20 @@ them to any POSIX environment that has Bash installed.
|
|||||||
Note that the leading underscore seems to be a convention.
|
Note that the leading underscore seems to be a convention.
|
||||||
If not using oh-my-zsh, you could link to `/usr/share/zsh/functions/Completion` (might require sudo), depending on the `$fpath` of your zsh installation.
|
If not using oh-my-zsh, you could link to `/usr/share/zsh/functions/Completion` (might require sudo), depending on the `$fpath` of your zsh installation.
|
||||||
In case of error, calling `compaudit` might help.
|
In case of error, calling `compaudit` might help.
|
||||||
- For bash/fish: Figure out how to install completion scripts and please document here
|
- For bash:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/ahmetb/kubectx.git ~/.kubectx
|
||||||
|
COMPDIR=$(pkg-config --variable=completionsdir bash-completion)
|
||||||
|
ln -sf ~/.kubectx/completion/kubens.bash $COMPDIR/kubens
|
||||||
|
ln -sf ~/.kubectx/completion/kubectx.bash $COMPDIR/kubectx
|
||||||
|
cat << FOE >> ~/.bashrc
|
||||||
|
|
||||||
|
|
||||||
|
#kubectx and kubens
|
||||||
|
export PATH=~/.kubectx:\$PATH
|
||||||
|
FOE
|
||||||
|
```
|
||||||
|
- For fish: Figure out how to install completion scripts and please document here
|
||||||
|
|
||||||
Example installation steps:
|
Example installation steps:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user