test: add e2e test suite and fix namespace/mention/assignee flags
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
11
cmd/alias.go
11
cmd/alias.go
@@ -22,11 +22,12 @@ var aliasCmd = &cobra.Command{
|
||||
return
|
||||
}
|
||||
if len(args) == 1 {
|
||||
if a, err := cfg.GetAlias(args[0]); err != nil {
|
||||
a, err := cfg.GetAlias(args[0])
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "alias not found:", args[0])
|
||||
} else {
|
||||
fmt.Println(a.Command)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println(a.Command)
|
||||
return
|
||||
}
|
||||
if err := cfg.SetAlias(&service.Alias{Name: args[0], Command: args[1], Description: aliasDesc}); err != nil {
|
||||
@@ -42,9 +43,9 @@ var aliasDelCmd = &cobra.Command{
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := cfg.DeleteAlias(args[0]); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
} else {
|
||||
output.PrintAction(cmd.OutOrStdout(), "Alias deleted", args[0], false)
|
||||
os.Exit(1)
|
||||
}
|
||||
output.PrintAction(cmd.OutOrStdout(), "Alias deleted", args[0], false)
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user