Skip to content

Commit 66036a1

Browse files
committed
Typo
1 parent 65794f1 commit 66036a1

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

cmd/completion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func Completion(rootCmd *cobra.Command) *cobra.Command {
1111
return &cobra.Command{
1212
Use: "completion [bash|zsh|fish|powershell]",
13-
Short: "Generate completion script",
13+
Short: "Generate shell completion script",
1414
Long: `Generate shell completion script for Git Profile.
1515
1616
To load completions:
@@ -47,7 +47,7 @@ Fish:
4747
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
4848
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
4949
DisableFlagsInUseLine: true,
50-
Run: func(cmd *cobra.Command, args []string) {
50+
Run: func(_ *cobra.Command, args []string) {
5151
switch args[0] {
5252
case "bash":
5353
_ = rootCmd.GenBashCompletionV2(os.Stdout, true)

cmd/import.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ func Import(cfg storage) *cobra.Command {
1414
return &cobra.Command{
1515
Use: "import [profile] [json-values]",
1616
Aliases: []string{"i"},
17-
Short: "Import profile",
18-
Long: "Import profile from JSON format.",
17+
Short: "Import a profile",
18+
Long: "Import a profile from JSON format.",
1919
Args: cobra.ExactArgs(2),
2020
Example: "cat my-profile.json | xargs -0 git-profile import my-profile",
2121
Run: func(cmd *cobra.Command, args []string) {
@@ -26,7 +26,7 @@ func Import(cfg storage) *cobra.Command {
2626

2727
err := json.Unmarshal([]byte(args[1]), &entries)
2828
if err != nil {
29-
cmd.PrintErr("Unable to decode profile values\n", err)
29+
cmd.PrintErrln("Unable to decode profile values:", err)
3030
os.Exit(1)
3131
}
3232

@@ -40,7 +40,7 @@ func Import(cfg storage) *cobra.Command {
4040
os.Exit(1)
4141
}
4242

43-
cmd.Printf("Successfully import `%s` profile", profile)
43+
cmd.Printf("Successfully imported `%s` profile.\n", profile)
4444
},
4545
}
4646
}

cmd/import_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ func TestImport(t *testing.T) {
2727
err := cmd.Execute()
2828

2929
is.NoErr(err)
30-
is.Equal(strings.TrimSpace(b.String()), "Successfully import `profile` profile")
30+
is.Equal(strings.TrimSpace(b.String()), "Successfully imported `profile` profile.")
3131
}

cmd/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ func List(cfg storage) *cobra.Command {
99
return &cobra.Command{
1010
Use: "list",
1111
Aliases: []string{"l"},
12-
Short: "List of profiles",
12+
Short: "List profiles",
1313
Long: "Displays a list of available profiles.",
1414
Run: func(cmd *cobra.Command, _ []string) {
1515
if cfg.Len() == 0 {

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/dotzero/git-profile/git"
1313
)
1414

15-
// Cmd is an CLI app
15+
// Cmd is a CLI app
1616
type Cmd struct {
1717
cobra.Command
1818

0 commit comments

Comments
 (0)