@@ -36,7 +36,7 @@ func makeJobs() *cobra.Command {
3636
3737 cmd .Flags ().BoolP ("json" , "j" , false , "Request output in JSON format" )
3838
39- cmd .Flags ().BoolP ("urls" , "u" , false , "Include the URLs to the job in the output " )
39+ cmd .Flags ().BoolP ("urls" , "u" , false , "In verbose mode, control whether to include URLs (URLs always shown in non-verbose mode) " )
4040
4141 return cmd
4242}
@@ -106,7 +106,11 @@ func runJobsE(cmd *cobra.Command, args []string) error {
106106 if err := json .Unmarshal ([]byte (res ), & statuses ); err != nil {
107107 return err
108108 }
109- printEvents (os .Stdout , statuses , verbose , includeURL )
109+
110+ // In non-verbose mode, always show URLs
111+ // In verbose mode, respect the --urls flag
112+ showURL := ! verbose || includeURL
113+ printEvents (os .Stdout , statuses , verbose , showURL )
110114 }
111115
112116 return nil
@@ -117,7 +121,7 @@ func printEvents(w io.Writer, statuses []JobStatus, verbose, includeURL bool) {
117121 tabwriter := tabwriter .NewWriter (w , 0 , 0 , 1 , ' ' , tabwriter .TabIndent )
118122 if verbose {
119123
120- st := "JOB ID\t OWNER\t REPO\t JOB\t RUNNER\t SERVER\t STATUS\t STARTED \ t AGE\t ETA\t LABELS"
124+ st := "JOB ID\t OWNER\t REPO\t JOB\t RUNNER\t SERVER\t STATUS\t AGE\t ETA\t LABELS"
121125 if includeURL {
122126 st = st + "\t URL"
123127 }
0 commit comments