Closed
Labels
enhancementa request to improve CLI
Description
Describe the feature or problem you’d like to solve
A couple things have risen to the level of things where we feel like adding the ability to configure a set of preferences for gh would be appropriate.
Proposed solution
Create a gh config command (open to other ideas on the naming, but this is what we were thinking).
Initially, this will include two preferences:
- SSH vs https default remote preference
- Default editor for use with gh
Our thinking is to have a config file, probably a yaml file, that contains these preferences and is where we read from when they use the tool. However, we'd also like a simpler and less error-prone way to change a particular preference, so we were thinking of:
gh config <key> <value>
For example, to change your default editor, you could: gh config editor vim (I don't know if this is exactly what the command would be, but that's the idea).
Additional context
Reacted by Mickaël Thely, Jonathan Neal and idrisolamide9
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLI
Activity
eddumelendez commentedon Mar 10, 2020
can we include aliases support?
billygriffin commentedon Mar 10, 2020
@eddumelendez That's being tracked separately in #294.
thefotios commentedon Apr 1, 2020
@billygriffin does it warrant having a separate config for this? For instance, ghq does something similar by using a namespace within
git-config.If this were able to leverage that, then you'd also get everything else around it for free like having a hierarchy of global, user, per-directory settings as well as conditional includes.
To access the configs,
ghwould could dump and parsegit config --list --includes, usegit config --get ...on individual items, or use something likelibgitto access the config programatically.vilmibm commentedon Apr 6, 2020
heya @thefotios . We explored that option and decided against it; in general we're trying to be very light in how we depend on
git. Given how far back we'd like to providegitsupport for and the wide varieties ofgitversions in the wild, we wanted a config system decoupled from any change ingit's config over time. That said, there are times when we do already take advantage ofgit configwhen it comes to branch configuration.