Showing the status of the first job when it's prefixed matched and the user input matched exact

This commit is contained in:
Diptanu Choudhury
2016-03-30 22:17:41 -07:00
parent 090653051d
commit b31b6b5d6e

View File

@@ -114,7 +114,7 @@ func (c *StatusCommand) Run(args []string) int {
c.Ui.Error(fmt.Sprintf("No job(s) with prefix or id %q found", jobID))
return 1
}
if len(jobs) > 1 {
if len(jobs) > 1 && strings.TrimSpace(jobID) != jobs[0].ID {
out := make([]string, len(jobs)+1)
out[0] = "ID|Type|Priority|Status"
for i, job := range jobs {