Comments (4)
Believe it or not I also actually found out about this a few weeks ago! So I agree that it would be nice to document in cobra. Also, shell completion which automatically provides descriptions of flags does not respect this format.
@calebstewart I encourage you to submit a PR for the documentation. And if you want, a PR for shell completion would also be appreciated
from cobra.
Come on!
from cobra.
I learned about this today reviewing #2105 :-)
Shouldn't this be documented in the pflags package?
from cobra.
I apologize for losing track of this issue. It seems from the discussion, and after reading back over everything that it makes the most sense to add this documentation to spf13/pflag
and spf13/cobra.dev
(to get it to the website docs). That is what I did above. I'm open to any tweaks to that documentation, but I at least took a stab at it.
from cobra.
Related Issues (20)
- I'd like to: -o wide -o json HOT 1
- `PersistentFlags` only works for root cmd HOT 1
- Override help subcommand logic HOT 2
- How to handle wrong subcommand?
- Release 1.8.1? HOT 4
- Is there a level to how many levels you can descend? HOT 3
- how to set `nil` as default value in `BoolVar`? HOT 1
- Completion does not work correctly if there is a @ symbol in the string HOT 2
- Allow `SilenceErrors` or `SilenceUsage` to override the rootCmd value.
- Nested searching with alias name HOT 9
- Is it possible to easily hide default flag values from help? HOT 5
- document using arg variables after cobra-cli init
- Arguments not passed to the help function
- Help command fails on flags HOT 2
- [Question] If I say exactly one parameter is required, how can I give a description so it it shows up if they --help HOT 2
- Need help with SetUsageTemplate() and Flags HOT 2
- Any way to have a "persistent" parameter that appears before the subcommand? HOT 4
- how to add entry to `Available Commands` help section. HOT 2
- How to distinguish default value and manually set value of a flag? HOT 2
- Root Command doesn't work with sub commands
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 cobra.