GithubHelp home page GithubHelp logo

Comments (11)

antograssiot avatar antograssiot commented on May 22, 2024

@davidyell bin/cake bake template Users index seeme to works normaly for me.

from bake.

davidyell avatar davidyell commented on May 22, 2024

Then I think that the options for the template command need updating to be clearer

from bake.

lorenzo avatar lorenzo commented on May 22, 2024

@davidyell would you be able to propose a fix or improvement to the options?

from bake.

davidyell avatar davidyell commented on May 22, 2024

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.

ADmad avatar ADmad commented on May 22, 2024

Which doesn't tell you that the subcommand is optional.

The square brackets around subcommand indicate it's optional.

from bake.

davidyell avatar davidyell commented on May 22, 2024

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.

dakota avatar dakota commented on May 22, 2024

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.

davidyell avatar davidyell commented on May 22, 2024

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.

dakota avatar dakota commented on May 22, 2024

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.

davidyell avatar davidyell commented on May 22, 2024

Cool, well I'll pin my hopes to the PR 🍭

from bake.

rchavik avatar rchavik commented on May 22, 2024

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.

from bake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.