Comments (13)
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.
from client.
+1 I have scripts to do stuff like this for me for kubectl cmds. In particular, to get the equivalent of kubectl logs foo*
is really useful when the pods name is generated.
from client.
cant use a star btw as it has meaning for bash.
from client.
I believe bash will pass through the *
if it does not glob anything, but if so, that's non-portable between directories and generally a bad idea. On the other hand, you can write 'foo*'
without too much more difficulty, and the familiar syntax may be worth it.
from client.
Do we want glob or regex?
I like kn service get --glob 'myrevision-1-*'
or kn service get --regex 'myrevision-1-.*'
or something.
from client.
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 sed
and grep
does, too. Having a --glob
to explicitly switch that behaviour on is of not much value IMO, as you get an error with or without this option when bash globbing kicks in accidentally.
I.e. kn service get --glob myservice*
and kn service get myservice*
would both give an error if there's a file myservice.yml
in the current directory. Likewise, both would work if properly quoted. Using wildcards is opt-in, so people who don't use it won't suffer from any side effects.
I'm for globbing instead of regexps as this is imo (a) sufficient and (b) easier to use.
from client.
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.
from client.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
from client.
@rhuss did you still want this?
from client.
@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).
from client.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
from client.
/remove-lifecycle stale
from client.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
from client.
Related Issues (20)
- Update plugin development docs HOT 5
- Can not get my broker through `kn broker list` HOT 6
- [48h Knative] KServe plugin HOT 4
- Align GVK format accepted by `--channel` flag HOT 12
- Flaky E2E test: e2e/TestDomain - create domain with TLS HOT 9
- Wrong version for kn create kafka channel HOT 7
- Add integration tests for all command usage examples in the binary HOT 6
- [48h Knative] Annotation and Label profiles HOT 1
- [48h Knative] Color output HOT 3
- [48h Knative] UX Evaluation HOT 11
- [48h Knative] Kamelet Sinks HOT 2
- [48h Knative] Command Usage Example Integration Testing POC HOT 4
- [48h Knative] Improved Logging HOT 7
- [48h Knative] Good first issues HOT 3
- Cmd `kn service wait` doesn't end on ready ksvc as expected
- CLI: `--user` option does not work as expected
- Add missing completion support for fish and PowerShell shells
- Error: fork/exec /usr/local/bin/kn-func: exec format error HOT 1
- Proposal: Fold back in client-pkg to Go submodule HOT 11
- kn service export doesn't work with traffic splits 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 client.