File tree 1 file changed +13
-1
lines changed 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,26 @@ func (r *RootCmd) create() *serpent.Command {
109
109
110
110
templateNames := make ([]string , 0 , len (templates ))
111
111
templateByName := make (map [string ]codersdk.Template , len (templates ))
112
+ uniqueOrganizations := make (map [uuid.UUID ]bool )
113
+ for _ , template := range templates {
114
+ uniqueOrganizations [template .OrganizationID ] = true
115
+ }
112
116
113
117
for _ , template := range templates {
114
118
templateName := template .Name
119
+ if len (uniqueOrganizations ) > 1 {
120
+ templateName += cliui .Placeholder (
121
+ fmt .Sprintf (
122
+ " (%s)" ,
123
+ template .OrganizationName ,
124
+ ),
125
+ )
126
+ }
115
127
116
128
if template .ActiveUserCount > 0 {
117
129
templateName += cliui .Placeholder (
118
130
fmt .Sprintf (
119
- " ( used by %s) " ,
131
+ " used by %s" ,
120
132
formatActiveDevelopers (template .ActiveUserCount ),
121
133
),
122
134
)
You can’t perform that action at this time.
0 commit comments