ohmyzsh icon indicating copy to clipboard operation
ohmyzsh copied to clipboard

Add rename-context alias to kubectl plugin

Open sarathsom opened this issue 2 years ago • 1 comments

Standards checklist:

  • [x] The PR title is descriptive.
  • [x] The PR doesn't replicate another PR which is already open.
  • [x] I have read the contribution guide and followed all the instructions.
  • [x] The code follows the code style guide detailed in the wiki.
  • [x] The code is mine or it's from somewhere with an MIT-compatible license.
  • [x] The code is efficient, to the best of my ability, and does not waste computer resources.
  • [x] The code is stable and I have tested it myself, to the best of my abilities.

Changes:

  • Adds an alias for config rename-context command for kubectl.

sarathsom avatar Mar 05 '22 15:03 sarathsom

+1 for kcrc

In my ~/.zshrc it is exactly the same. I also added kcrtc which is for renaming THIS context:

alias kcrc="kubectl config rename-context"
alias kcrtc="kcrc $(kccc)"

Full example ~/.zshrc file located here

rshmhrj avatar Aug 21 '22 18:08 rshmhrj