zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.1k stars 103 forks source link

README: Link to syntax for the TOML config #805

Closed hoijui closed 2 years ago

hoijui commented 2 years ago

.. or give help in any other way, where the TOML config is first mentioned, about how the config file should look like.

hoijui commented 2 years ago

great project btw. thank you! :-)

prarit commented 2 years ago

Great suggestion @hoijui.

Would an example like

[core]
  host = "https://gitlab.com"
  token = "1223334444555556789K"
  user = "yourusername"

[mr_checkout]
  force = true

[mr_create]
  force-linebreak = true
  draft = true

[mr_edit]
  force-linebreak = true

work for you?

bmeneg commented 2 years ago

I think the README deserves an highlight about the "setting default flags for commands" subject. IMHO that's something that only those aware of how go-cobra and go-viper works know how to set them 😄

hoijui commented 2 years ago

Great suggestion @hoijui.

Would an example like

[core]
  host = "https://gitlab.com"
  token = "1223334444555556789K"
  user = "yourusername"

[mr_checkout]
  force = true

[mr_create]
  force-linebreak = true
  draft = true

[mr_edit]
  force-linebreak = true

work for you?

that looks good! :-) If there were also a link to all the possible settings or something like that, I would be fully satisfied.

hoijui commented 2 years ago

though @bmeneg 's suggestion also sounds good.. I certainly don;t know about it. ;-)

prarit commented 2 years ago

I think the README deserves an highlight about the "setting default flags for commands" subject. IMHO that's something that only those aware of how go-cobra and go-viper works know how to set them smile

Yeah :) Perhaps a sentence indicating that any option can be set, and then a pointer to the simple example file above?

hoijui commented 2 years ago

how do I know what "any option" means. I think would need a list of them.

bmeneg commented 2 years ago

@hoijui any option == any available flag in the --help. The list would be exactly all the flags. Some of them makes sense to have a default value set, others done, but every flag can be set in the configuration file. Do you think that using "flag" instead of "option" would be clearer?

prarit commented 2 years ago

how do I know what "any option" means. I think would need a list of them.

The --help commands will provide this for you. Let me fix the text to indicate that.

prarit commented 2 years ago

Fixed.

hoijui commented 2 years ago

AHA!! :O YES! now it is perfect, thank you for the change, and you both for the explanation! I honestly did not understand, it was about the CLI flags/options!

This issue should be closed when https://github.com/zaquestion/lab/pull/807 is merged.