Comments (11)
@davidyell bin/cake bake template Users index
seeme to works normaly for me.
from bake.
Then I think that the options for the template
command need updating to be clearer
from bake.
@davidyell would you be able to propose a fix or improvement to the options?
from bake.
My issue was that the options parser only showed the all
command. There was no help text about the possibility of omitting the sub-command in order to bake templates.
As I tried bin/cake bake template -h
and the return is a pattern of
cake bake.bake template [subcommand] [options] [<controller>] [<action>] [<alias>]
Which doesn't tell you that the subcommand is optional. Perhaps the options parser needs to be updated to add to the copy describing the all
subcommand as being optional.
from bake.
Which doesn't tell you that the subcommand is optional.
The square brackets around subcommand
indicate it's optional.
from bake.
That's incredibly nuanced and unclear in my opinion. Enough that as a 'seasoned' cake developer, I had no idea that was even a convention. I believe in making things as obvious as possible for these reasons.
from bake.
At least in the *nix world, square brackets [ ]
have always been used to denote optional arguments, options and sub-commands (http://stackoverflow.com/a/9727046 and http://docopt.org/).
from bake.
So how does that help users who develop on Windows? I can appreciate the origins, but it's just not obvious enough in it's current state, and relies on knowledge that some users might not have. I certainly had no idea that square brackets meant optional, and I've been a developer for years.
Making things obvious and easier to work with is not a bad thing, I'm surprised we are discussing it. Surely helping users to get stuff done is important, whether they posses knowledge which is innate to you or not.
from bake.
Windows follows the exact same standard 😄 (Based on my limited run if a few windows commands). For the record, I'm not disagreeing with you, and I think it would be a good idea to explicitly state optional arguments on the CLI help.
from bake.
Cool, well I'll pin my hopes to the PR 🍭
from bake.
I don't see why we need to document optional arguments when it's already enclosed within []
. I think It's common enough convention and not really UNIX specific.
- "Optional items enclosed in square brackets: []."
http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form - "Any items inside a bracket are optional. Brackets are not to be taken literally so don't use them when executing a command."
http://pcsupport.about.com/od/commandlinereference/a/command-syntax.htm - "Brackets ([ ]) indicate optional items. A parameter and its value can be optional, or the name of a required parameter can be optional"
https://technet.microsoft.com/en-us/library/hh847867.aspx - "Items in square brackets [ ] are optional KEYWORDs or parameters that do not have to be used in the statement."
http://www.qb64.net/wiki/index.php?title=Syntax_Notation_Conventions - "Optional arguments should always be surrounded by square brackets."
http://courses.cms.caltech.edu/cs11/material/general/usage.html
from bake.
Related Issues (20)
- Pending task for Cake 5
- RFC: Do not generate associations for `_id` fields if no Table object or database table present HOT 3
- Bug found in 2.8.0 - Error when baking component `Twig\Error\SyntaxError` HOT 1
- Baking Middleware should bake Middleware tests HOT 1
- `--datasource` alias to `--connection` for consistency HOT 2
- 2.x: Dirty state after tests HOT 3
- DisplayField does not fallback to `*_name` field HOT 1
- Allow passing multiple model names HOT 1
- Incorrect message when `plugins` directory not exists using bake HOT 13
- Column with *_id not generating a `belongsTo` relation anymore. HOT 2
- bake not override plugins bake template HOT 4
- Return value of Bake\Command\ModelCommand::getDisplayField() must be of the type string or null, array returned in HOT 6
- [3.x] Adaption to the new behavior of `EntityTrait::has()` HOT 5
- Wrong signature for get() in table classes HOT 2
- RFC: generics for array collections? HOT 2
- Cannot bake ControllerTest with model type other than Table HOT 9
- Application/Validation rule issues HOT 3
- Baked enum docblock wrong
- Baking snapshot with autoid HOT 5
- Bake snapshot losing structure data
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 bake.