Comments (6)
I guess it is caused by different separators (
for -
and \n
for others) used in _arguments
. Just change -
separator to \n
can solve the problem. Like the following:
_arguments "1: :($(kubectl config get-contexts --output='name')
-)"
from kubectx.
Weird, this no longer reproduces on my machine. It was there a few days ago when I had more contexts.
from kubectx.
This is so weird and it only reproduces with the set of contexts listed above.
from kubectx.
I tried multiple things here, like deleting the new line between -
and the list:
8 _arguments "1: :((- $(kubectl config get-contexts --output='name') ))"
adding new line after list, with \
:
8 _arguments "1: :((- \
9 $(kubectl config get-contexts --output='name') \
10 ))"
without \
:
8 _arguments "1: :((-
9 $(kubectl config get-contexts --output='name')
10 ))"
no luck, the problem still reproduces.
from kubectx.
Try the following one? It works on my machine.
_arguments "1: :(- $(kubectl config get-contexts --output='name'))"
I guess the problem is not \n
, but the additional parenthesis.
from kubectx.
You're right! This is working, even with the -
and command separated out.
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.