Skip to content

Commit fb27f7a

Browse files
committed
Typo
1 parent 36e6cb1 commit fb27f7a

9 files changed

Lines changed: 22 additions & 14 deletions

File tree

cmd/add.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ func addCommand(
3131
return &cobra.Command{
3232
Use: "add [profile] [key] [value]",
3333
Aliases: []string{"set"},
34-
Short: "Add an entry to a profile",
35-
Long: "Adds an entry to a profile or updates an existing profile.",
34+
Short: "Add or update profile entries",
35+
Long: "Add a key to a profile or update an existing profile.",
3636
Example: multiline(
3737
`git-profile add`,
3838
`git-profile add my-profile user.email work@example.com`,

cmd/current.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ func Current(cfg storage, v vcs) *cobra.Command {
1616
return &cobra.Command{
1717
Use: "current",
1818
Aliases: []string{"c"},
19-
Short: "Show selected profile",
20-
Long: "Show selected profile for current repository.",
19+
Short: "Show the current profile",
20+
Long: "Show the selected profile for the current repository.",
21+
Example: "git-profile current",
2122
Run: func(cmd *cobra.Command, _ []string) {
2223
if cfg.Len() == 0 || !v.IsRepository() {
2324
os.Exit(1)

cmd/del.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func delCommand(
2323
return &cobra.Command{
2424
Use: "del [profile] [key]",
2525
Aliases: []string{"rm"},
26-
Short: "Delete an entry or a profile",
26+
Short: "Delete a profile or a profile entry",
2727
Long: multiline(
2828
`Delete an entry from a profile or an entire profile.`,
2929
`Enter the "key" argument to remove the exact key from the profile.`,

cmd/export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func Export(cfg storage) *cobra.Command {
1313
Use: "export [profile]",
1414
Aliases: []string{"e"},
1515
Short: "Export a profile",
16-
Long: "Export a profile in JSON format.",
16+
Long: "Export a profile as JSON.",
1717
Args: cobra.ExactArgs(1),
1818
Example: "git-profile export my-profile",
1919
Run: func(cmd *cobra.Command, args []string) {

cmd/import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ func Import(cfg storage) *cobra.Command {
1515
Use: "import [profile] [json-values]",
1616
Aliases: []string{"i"},
1717
Short: "Import a profile",
18-
Long: "Import a profile from JSON format.",
18+
Long: "Import a profile from JSON.",
1919
Args: cobra.ExactArgs(2),
20-
Example: "cat my-profile.json | xargs -0 git-profile import my-profile",
20+
Example: `git-profile import my-profile '[{"key":"user.email","value":"work@example.com"}]'`,
2121
Run: func(cmd *cobra.Command, args []string) {
2222
profile := args[0]
2323
filename, _ := cmd.Flags().GetString("config")

cmd/list.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ func List(cfg storage) *cobra.Command {
1010
Use: "list",
1111
Aliases: []string{"l"},
1212
Short: "List profiles",
13-
Long: "Displays a list of available profiles.",
13+
Long: "Display the list of available profiles.",
14+
Example: "git-profile list",
1415
Run: func(cmd *cobra.Command, _ []string) {
1516
if cfg.Len() == 0 {
1617
cmd.Println(`There are no available profiles.`)

cmd/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ type Cmd struct {
3333
func New() *Cmd {
3434
root := cobra.Command{
3535
Use: "git-profile",
36-
Short: "Allows you to switch between multiple user profiles in git repositories",
36+
Short: "Manage multiple Git identities per repository",
3737
Long: multiline(
38-
"Git Profile allows you to add and switch between multiple",
39-
"user profiles in your git repositories.",
38+
"Git Profile helps you manage multiple Git identities",
39+
"and switch between them per repository.",
4040
),
4141
}
4242

cmd/use.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ func useCommand(
2525
Aliases: []string{"u"},
2626
Short: "Use a profile",
2727
Long: "Applies the selected profile entries to the current git repository.",
28+
Example: multiline(
29+
`git-profile use`,
30+
`git-profile use my-profile`,
31+
),
2832
Run: func(cmd *cobra.Command, args []string) {
2933
if !v.IsRepository() {
3034
cmd.PrintErrln("The current working directory is not a git repository.")

cmd/version.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ import (
77
// Version returns `version` command
88
func Version(c *Cmd) *cobra.Command {
99
return &cobra.Command{
10-
Use: "version",
11-
Short: "Print the version number of Git Profile",
10+
Use: "version",
11+
Short: "Print version information",
12+
Long: "Print the version, commit hash, and build date.",
13+
Example: "git-profile version",
1214
Run: func(cmd *cobra.Command, _ []string) {
1315
cmd.Println("Git Profile")
1416
cmd.Println("Version:", c.Version)

0 commit comments

Comments
 (0)