question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Set global CLI option defaults

See original GitHub issue

Hey team, really enjoying using garden so far. I’ve been running into this issue where the default value of fancy for --logger-type does not play nicely with the terminal in my IDE (webstorm), and I’m constantly forgetting to pass the flag to change it to basic, which made me think this may be a useful feature. Apologies if this functionality is available and I somehow missed it, I’ve gone through the docs pretty thoroughly and haven’t seen it mentioned.

What should the user be able to do

Set a default value for global CLI options. I’ve thought of two ways this of implementing this (though I’m not familiar with the internals of the project so I’m sure you’ll have better ideas).

Idea A. Set the default value for a global cli option via the garden config command. Example:

$ garden config logger-type basic
✔ Global default for CLI flag --logger-type set to 'basic'

Idea B: A cli key in the project configuration file. Example:

kind: Project
name: myProject
cli:
    loggerType: basic
...

Why do they want to do this

Like I mentioned above, I have an immediate need for this because remembering to pass the --logger-type=basic flag for every command is quite tedious. Other global options where I could see this being useful is --log-level, --env, and --output.

Priority: Probably pretty low, though I would greatly appreciate it 😃

Thanks! Parker

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
10kocommented, Jan 19, 2020

I also really liked the structure. This could maybe be turned into a feature request template. Maybe your first PR @parkerself22? 😃

If not I will take care of it in the next days. Again thanks for the request.

0reactions
stale[bot]commented, Mar 19, 2020

This issue has been automatically marked as stale because it hasn’t had any activity in 60 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to remove the label if you think it doesn’t apply. Thank you for submitting this issue and helping make Garden a better product!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow showing default values globally. · Issue #1018 - GitHub
Feature request, as in #646, we already had a discussion how to easily show default values for options. As context_settings is already used ......
Read more >
create-feature — AWS CLI 1.27.37 Command Reference
The name of the variation to use as the default variation. The default variation is served to users who are not allocated to...
Read more >
git-config Documentation - Git
Defaults to off when a specific file is given (e.g., using --file , --global , etc) and on when searching all config files....
Read more >
Configuring the CLI - Oracle Help Center
Specify a default profile. · Set default values for command options so you don't have to type them into the command line. ·...
Read more >
Advanced configuration - GitLab Docs
GitLab Runner does not require a restart when you change most options. This includes parameters in the [[runners]] section and most parameters in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found