Skip to content

Commit 1a8feca

Browse files
authored
feat: add short aliases to top-level verb commands (#944)
get: g; rename: re; disable: dis; enable: en; log: lo; status: s, st. No alias collides with an existing command name or alias.
1 parent 4ead423 commit 1a8feca

8 files changed

Lines changed: 30 additions & 19 deletions

File tree

.github/workflows/claude-pr-review.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
6969
Use `gh pr comment --edit-last --create-if-none` for top-level feedback,
7070
so the summary replaces the previous run's summary instead of stacking.
71+
The posted comment body must contain only the review content —
72+
no branch name, commit hash, or other metadata appended at the end.
7173
Use `mcp__github_inline_comment__create_inline_comment` to highlight specific code issues.
7274
Only post GitHub comments - don't submit review text as messages.
7375
@@ -150,5 +152,7 @@ jobs:
150152
151153
Use `gh pr comment --edit-last --create-if-none` for top-level feedback,
152154
so the summary replaces the previous run's summary instead of stacking.
155+
The posted comment body must contain only the review content —
156+
no branch name, commit hash, or other metadata appended at the end.
153157
Use `mcp__github_inline_comment__create_inline_comment` to highlight specific code issues.
154158
Only post GitHub comments - don't submit review text as messages.

cmd/kosli/disable.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ const disableDesc = `Kosli disable commands.`
1010

1111
func newDisableCmd(out io.Writer) *cobra.Command {
1212
cmd := &cobra.Command{
13-
Use: "disable",
14-
Short: disableDesc,
15-
Long: disableDesc,
13+
Use: "disable",
14+
Aliases: []string{"dis"},
15+
Short: disableDesc,
16+
Long: disableDesc,
1617
}
1718

1819
// Add subcommands

cmd/kosli/enable.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ const enableDesc = `Kosli enable commands.`
1010

1111
func newEnableCmd(out io.Writer) *cobra.Command {
1212
cmd := &cobra.Command{
13-
Use: "enable",
14-
Short: enableDesc,
15-
Long: enableDesc,
13+
Use: "enable",
14+
Aliases: []string{"en"},
15+
Short: enableDesc,
16+
Long: enableDesc,
1617
}
1718

1819
// Add subcommands

cmd/kosli/get.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ const getDesc = `All Kosli get commands.`
1010

1111
func newGetCmd(out io.Writer) *cobra.Command {
1212
cmd := &cobra.Command{
13-
Use: "get",
14-
Short: getDesc,
15-
Long: getDesc,
13+
Use: "get",
14+
Aliases: []string{"g"},
15+
Short: getDesc,
16+
Long: getDesc,
1617
}
1718

1819
// Add subcommands

cmd/kosli/log.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ const logDesc = `All Kosli log commands.`
1010

1111
func newLogCmd(out io.Writer) *cobra.Command {
1212
cmd := &cobra.Command{
13-
Use: "log",
14-
Short: logDesc,
15-
Long: logDesc,
13+
Use: "log",
14+
Aliases: []string{"lo"},
15+
Short: logDesc,
16+
Long: logDesc,
1617
}
1718

1819
// Add subcommands

cmd/kosli/rename.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ const renameDesc = `All Kosli rename commands.`
1010

1111
func newRenameCmd(out io.Writer) *cobra.Command {
1212
cmd := &cobra.Command{
13-
Use: "rename",
14-
Short: renameDesc,
15-
Long: renameDesc,
13+
Use: "rename",
14+
Aliases: []string{"re"},
15+
Short: renameDesc,
16+
Long: renameDesc,
1617
}
1718

1819
// Add subcommands

cmd/kosli/search.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func newSearchCmd(out io.Writer) *cobra.Command {
7777
o := new(searchOptions)
7878
cmd := &cobra.Command{
7979
Use: "search {GIT-COMMIT | FINGERPRINT}",
80+
Aliases: []string{"se"},
8081
Short: searchShortDesc,
8182
Long: searchLongDesc,
8283
Example: searchExample,

cmd/kosli/status.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ type statusOptions struct {
2323
func newStatusCmd(out io.Writer) *cobra.Command {
2424
o := new(statusOptions)
2525
cmd := &cobra.Command{
26-
Use: "status",
27-
Short: statusShortDesc,
28-
Long: statusLongDesc,
29-
Args: cobra.NoArgs,
26+
Use: "status",
27+
Aliases: []string{"st"},
28+
Short: statusShortDesc,
29+
Long: statusLongDesc,
30+
Args: cobra.NoArgs,
3031
RunE: func(cmd *cobra.Command, args []string) error {
3132
return o.run(out)
3233
},

0 commit comments

Comments
 (0)