From 11dec289f2bbdd97523453678bea31658bf39644 Mon Sep 17 00:00:00 2001 From: Eitan Joffe Date: Thu, 15 Jul 2021 16:08:27 -0700 Subject: [PATCH] Add aliases to status and update commands Fixes: #89 commit-id:91c9d647 --- cmd/spr/main.go | 14 ++++++-------- readme.md | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/cmd/spr/main.go b/cmd/spr/main.go index b8db626..47536a5 100644 --- a/cmd/spr/main.go +++ b/cmd/spr/main.go @@ -118,14 +118,11 @@ VERSION: {{.Version}} } return nil }, - Action: func(c *cli.Context) error { - stackedpr.StatusPullRequests(ctx) - return nil - }, Commands: []*cli.Command{ { - Name: "status", - Usage: "Show status of open pull requests", + Name: "status", + Aliases: []string{"s", "st"}, + Usage: "Show status of open pull requests", Action: func(c *cli.Context) error { stackedpr.StatusPullRequests(ctx) return nil @@ -135,8 +132,9 @@ VERSION: {{.Version}} }, }, { - Name: "update", - Usage: "Update and create pull requests for updated commits in the stack", + Name: "update", + Aliases: []string{"u", "up"}, + Usage: "Update and create pull requests for updated commits in the stack", Action: func(c *cli.Context) error { stackedpr.UpdatePullRequests(ctx) return nil diff --git a/readme.md b/readme.md index d1fcd6e..388f29f 100644 --- a/readme.md +++ b/readme.md @@ -113,7 +113,7 @@ MERGED #59 Feature 2 Show Current Pull Requests -------------------------- ```shell -> git spr +> git spr status [ยทโœ—โœ”โœ—] 60: Feature 3 ```