-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support wildcards when selecting resources #71
Comments
+1 I have scripts to do stuff like this for me for kubectl cmds. In particular, to get the equivalent of |
cant use a star btw as it has meaning for bash. |
I believe bash will pass through the |
Do we want glob or regex? I like |
Right, a shell will leave * untouched if it doesn't match anything. And yes, you are in danger if one of your files in the current directory is named after your service like a resource descriptor file, which is not unlikely that such a file exists holding e.g. a service definition. However, I would expect wildcard matching mostly for matching random suffixes like on revisions for which you probably don't have a file/directory of the same name in the cwd. Tbh, I think we can require quoting in such a situation, much like I.e. I'm for globbing instead of regexps as this is imo (a) sufficient and (b) easier to use. |
Another option I've done in the past for my tools is to assume the name given is a prefix, so just default to "*" at then end under the covers. No worry about bash matching files. |
And of course, exact full matches take precedence over longer wild-card possibilities, so an exact match would not result in any potential "don't know which one you mean" type of error. |
Updates invoking e2e tests commands
This issue is stale because it has been open for 90 days with no |
@rhuss did you still want this? |
@duglin good point, I'm not sure if this is still a top priority. Of course it makes a nice touch. For scripting this would make probably quite some sense, for interactive usage we probably should better level up on our completion game, to allow context sensitive completion values (like actual names that are deployed). |
This issue is stale because it has been open for 90 days with no |
/remove-lifecycle stale |
This issue is stale because it has been open for 90 days with no |
When using commands which requires a resource name as argument like
kn revision get <revision>
orkn service get <srv>
(orkn service list
if not merged together withkn service get
as proposed in #48), then having a wildcard evaluation on the argument would be very helpful, especially when dealing with resource names that have autogenerated suffixes (like revisions).More general, a semantic like for general Unix commands like
ls
would be very useful IMO.kn revision get
--> get all revisionskn revision get *
--> same as abovekn revision get myrevision-1-9865
--> get specific revisionkn revision get myrevision-1-*
--> get revision with wildcardkn revision get myrevision*
--> filter on revisions, possibly returning multiple entries.The text was updated successfully, but these errors were encountered: