Comments (11)
@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.
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.
Any suggestions?
I personally aliased kubectl to k, so I don't see this problem.
from kubectx.
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.
Agreed, absolutely the only thing I don't like about this lovely tool :)
How about kctx ? kcontext?
from kubectx.
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.
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.
@ahmetb thanks for the info, i'll file an issue upstream.
from kubectx.
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.
@rfay ah yeah this is gnu vs bsd readlink difference. Subscribe to #8.
from kubectx.
@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)
- Are go versions still considered not stable? HOT 2
- kubie and kubens mixed cause kubeconfig syntax error HOT 12
- Can’t use `--height` in fzf options on Windows HOT 2
- blank issue HOT 1
- Add --selector option to kubens HOT 1
- Feature Request: Use kubectx to use right version of kubectl binary for a given K8s cluster HOT 1
- `kubens` fails with `invalid apiVersion "client.authentication.k8s.io/v1"` but `kubectl` works normally HOT 2
- Vulnerability of dependency "golang.org/x/net" HOT 1
- Add completions for Nushell
- Add kubectl plugin installation to Homebrew formula HOT 4
- [Go] kubens not working with in-cluster config HOT 1
- show all of NAME, CLUSTER and AUTHINFO in cluster selection list HOT 2
- Allow customizing path to KUBECTX and KUBENS_DIR
- Homebrew install makes kubectx slow HOT 6
- Shell completions (for zsh) fail for kubectx if its binary is renamed to kx HOT 1
- Autocomplete does not work when installed as Krew plugin HOT 2
- Autocomplete breaks when multiple longer contexts match HOT 2
- kubectl ctx outputs code lines start with plus sign + HOT 1
- error: open /home/myuser/.kube/config: permission denied HOT 1
- Consider open up internal packages HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubectx.