GithubHelp home page GithubHelp logo

Rename kubectx about kubectx HOT 11 CLOSED

ahmetb avatar ahmetb commented on May 14, 2024 4
Rename kubectx

from kubectx.

Comments (11)

ahmetb avatar ahmetb commented on May 14, 2024 2

@jwhitcraft I am using ZSH and when I alias, completion just works fine. But I see that once I alias in bash, it doesn't do completion. I see many people use Bash so I take this must be a real pain point.

from kubectx.

ahmetb avatar ahmetb commented on May 14, 2024 2

Hi folks, sorry for auto-closing the issue with the commit. I merged a solution: You can now brew install kubectx --with-short-names and it will install kubectx as kctx (and kubens, which I just added, as kns). With this option, we don’t have to rename the project. The bash/zsh completions should be working fine with shorthand names, too. Let me know if you run into any issues.

from kubectx.

ahmetb avatar ahmetb commented on May 14, 2024 1

Any suggestions?

I personally aliased kubectl to k, so I don't see this problem.

from kubectx.

ahmetb avatar ahmetb commented on May 14, 2024 1

Purely from the marketing aspect, I actually tend to keep it as kubectx. In fact, I'm planning to add a new accompanying command called kubens (#1) .

I wish brew link had a way of aliasing the command easily so that you all could personalize. I will keep this discussion open to gather more feedback. Perhaps we can switch to kctx/kns someday.

from kubectx.

rfay avatar rfay commented on May 14, 2024

Agreed, absolutely the only thing I don't like about this lovely tool :)

How about kctx ? kcontext?

from kubectx.

pieterlange avatar pieterlange commented on May 14, 2024

kctx would be better from a autocompletion perspective. i'd choose kontext from a marketing perspective. but thats up to the author (caveat: marketing isn't my expertise)

from kubectx.

jwhitcraft avatar jwhitcraft commented on May 14, 2024

@ahmetb

kinda of off topic, since you aliased k to kubectl do you have bash completion working, I can't figure out how to make the completion work for the alias of k.

i have this, but it doesn't work

alias k='kubectl'
source <(kubectl completion bash)
complete -o default -F __start_kubectl k

from kubectx.

jwhitcraft avatar jwhitcraft commented on May 14, 2024

@ahmetb thanks for the info, i'll file an issue upstream.

from kubectx.

rfay avatar rfay commented on May 14, 2024

Thanks for this! I did uninstall and then brew install kubectx --with-short-names and now:

$ kctx
readlink: illegal option -- f
usage: readlink [-n] [file ...]
/usr/local/bin/kctx: line 28: ./../include/utils.bash: No such file or directory

This is MacOS Sierra, readlink is the standard one installed in /usr/bin

$ brew info kubectx
ahmetb/kubectx/kubectx: stable 0.3.0, HEAD
Tool that can switch between kubectl contexts easily and create aliases
https://github.com/ahmetb/kubectx
/usr/local/Cellar/kubectx/0.3.0 (11 files, 24KB) *
  Built from source on 2017-05-17 at 07:18:48 with: --with-short-names
From: https://github.com/ahmetb/kubectx/blob/master/Formula/kubectx.rb

from kubectx.

ahmetb avatar ahmetb commented on May 14, 2024

@rfay ah yeah this is gnu vs bsd readlink difference. Subscribe to #8.

from kubectx.

ye avatar ye commented on May 14, 2024

@ahmetb sorry to inject into this old thread here, but did we get rid off the --with-short-names Homebrew option and the aliases? If so can you provide some explanation? I am actually getting used to use kctx and kns and changing that muscle memory is really hard...I mean I can alias those myself but I am curious to know what else is in --with-short-names .

https://github.com/ahmetb/kubectx/compare/v0.6.2...v0.6.3?expand=1

Update: never mind found it on #112 that

from kubectx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.