tide icon indicating copy to clipboard operation
tide copied to clipboard

Feature: Truncate kubectl context using variables

Open rodrigobdz opened this issue 2 years ago • 2 comments

Truncate kubectl output using environment variables.

Description

Requires the following variables to be defined.

Example variable definition:

set -x tide_kubectl_truncation_strategy l
set -x tide_kubectl_truncation_length 31

Motivation and Context

My kubectl context is too large and almost fills an entire line.

Same approach as in: https://github.com/IlanCosman/tide/blob/447945d2cff8f70d5c791dd4eec8b322d37798dd/functions/_tide_item_git.fish#L2

Closes #

Screenshots (if appropriate)

How Has This Been Tested

I tested the changes by modifying the file $HOME/.config/fish/functions/_tide_item_kubectl.fish.

  • [x] I have tested using Linux.
  • [x] I have tested using MacOS.

Checklist

  • [x] I am ready to update the wiki accordingly.
  • [ ] I have updated the tests accordingly.

rodrigobdz avatar Apr 17 '23 15:04 rodrigobdz

I can confirm that this is working on Linux.

olujicz avatar Sep 27 '23 13:09 olujicz

Thanks @olujicz. I checked the Linux test accordingly.

rodrigobdz avatar Oct 11 '23 20:10 rodrigobdz