Comments (4)
@braderhart does it make any difference if you use cmk from the powershell terminal?
from cloudstack-cloudmonkey.
It's a bit unfortunate that cloudmonkey doesn't use one of the standard Go flag packages (such as https://github.com/spf13/cobra ). This would make it much easier to add bash completion support.
On the other hand, it shouldn't be too difficult to use something like https://github.com/posener/complete directly.
from cloudstack-cloudmonkey.
@onitake cobra is not a standard Go flag package, besides it's a heavily bloated dependency. cmk
already uses the standard flag
package: https://github.com/apache/cloudstack-cloudmonkey/blob/master/cmk.go#L21
cmk
provides an autocompletion for not just parameters but also parameter values when used in the shell mode. I'm not sure other stated dependencies provide value completion (by querying via a server-side request) as well. Pull requests are welcome!
from cloudstack-cloudmonkey.
@rhtyd I totally agree with you on that one. However, by using cobra, bash autocompletion would be easier to add.
The standard flag package is very primitive and cannot autogenerate bash autocompletion strings like many Go tools do.
The semi-dynamic nature of cmk will certainly make it a bit more difficult to implement this - but there are many tools that do send server requests when autocompleting. scp
and kubectl
come to mind.
posener/complete
is compatible with the standard flags package, so integrating it into cmk
will be easy. What will be a bit more complicated is adding the dynamic commands. The documentation is here: https://godoc.org/github.com/posener/complete
from cloudstack-cloudmonkey.
Related Issues (20)
- filter is ignored on e.g. deploy virtual machine HOT 9
- associatednetworkid= does not autocomplete HOT 7
- verifycert option does not disable certificate signed by unknown authority error HOT 4
- Migrate to Github Actions HOT 2
- Create Role Permission Deny Rule Fails! HOT 1
- Provide "NOT" option when querying with cmk HOT 3
- Allow for CTRL-C to break the current operation HOT 6
- Allow cmk to pass * as parameter value HOT 2
- Readline issues when line goes beyond screen width HOT 1
- In CLI mode, cmk calls sync and doesn't cache it HOT 1
- Support POST method
- In CLI mode getting error: failed to authenticate, please check the credentials HOT 3
- How to run a cross-platform build? HOT 3
- hour value in the startdate,enddate parameter for command list usagerecords is ignored HOT 2
- Explore template/iso file upload from cmk
- Add support for 2FA in cmk HOT 3
- Validation for set cmd attributes (profile, url, etc)
- serviceofferingid autocomplete in deploy virtualmachine api cmd doesn't list the offering ids, instead picks some integer id
- Reverse parameter filtering
- 6.4.0 add host -> authentication error HOT 4
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 cloudstack-cloudmonkey.