Skip to content

Commit 1a5bc06

Browse files
committed
usage cleanup
1 parent bd907ec commit 1a5bc06

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

command/config.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ func init() {
1313
configGetCmd.Flags().StringP("host", "h", "", "Get per-host setting")
1414
configSetCmd.Flags().StringP("host", "h", "", "Set per-host setting")
1515

16+
// TODO reveal and add usage once we properly support multiple hosts
17+
configGetCmd.Flags().MarkHidden("host")
18+
configSetCmd.Flags().MarkHidden("host")
1619
}
1720

1821
var configCmd = &cobra.Command{
1922
Use: "config",
2023
Short: "Set and get gh settings",
21-
Long: `Get and set key/value strings. They can be optionally scoped to a particular host.
24+
Long: `Get and set key/value strings.
2225
2326
Current respected settings:
2427
- git_protocol: https or ssh. Default is https.
@@ -27,28 +30,25 @@ Current respected settings:
2730
}
2831

2932
var configGetCmd = &cobra.Command{
30-
Use: "get",
33+
Use: "get <key>",
3134
Short: "Prints the value of a given configuration key.",
32-
Long: `Get the value for a given configuration key, optionally scoping by hostname.
35+
Long: `Get the value for a given configuration key.
3336
3437
Examples:
35-
gh config get git_protocol
38+
$ gh config get git_protocol
3639
https
37-
gh config get --host example.com
38-
ssh
3940
`,
4041
Args: cobra.ExactArgs(1),
4142
RunE: configGet,
4243
}
4344

4445
var configSetCmd = &cobra.Command{
45-
Use: "set",
46+
Use: "set <key> <value>",
4647
Short: "Updates configuration with the value of a given key.",
47-
Long: `Update the configuration by setting a key to a value, optionally scoping by hostname.
48+
Long: `Update the configuration by setting a key to a value.
4849
4950
Examples:
50-
gh config set editor vim
51-
gh config set --host example.com editor eclipse
51+
$ gh config set editor vim
5252
`,
5353
Args: cobra.ExactArgs(2),
5454
RunE: configSet,

0 commit comments

Comments
 (0)