@@ -137,16 +137,43 @@ def cli(ctx):
137
137
_help , ["boards" , "config" , "examples" , "raw" , "system" , "upgrade" ]
138
138
)
139
139
140
- # -- Reformat the Help string
141
- _help = "\n " .join (_help )
142
- _help = _help .replace ("Commands:\n " , "Project commands:\n " )
143
- _help += "\n \n Setup commands:\n "
144
- _help += "\n " .join (setup_help )
145
- _help += "\n \n Utility commands:\n "
146
- _help += "\n " .join (util_help )
147
- _help += "\n "
148
-
149
- click .secho (_help )
140
+ # -- Project commands:
141
+ cmd_help = find_commands_help (
142
+ _help ,
143
+ [
144
+ "build" ,
145
+ "clean" ,
146
+ "sim" ,
147
+ "test" ,
148
+ "verify" ,
149
+ "lint" ,
150
+ "time" ,
151
+ "upload" ,
152
+ "graph" ,
153
+ ],
154
+ )
155
+
156
+ # -- Get the Help header
157
+ index = _help .index ("Commands:" )
158
+ header_help = _help [:index ]
159
+
160
+ # -- Print header
161
+ click .secho ("\n " .join (header_help ))
162
+
163
+ # -- Print project commands:
164
+ click .secho ("Project commands:" )
165
+ click .secho ("\n " .join (cmd_help ))
166
+ click .secho ()
167
+
168
+ # -- Print Setup commands:
169
+ click .secho ("Setup commands:" )
170
+ click .secho ("\n " .join (setup_help ))
171
+ click .secho ()
172
+
173
+ # -- Print utility commands:
174
+ click .secho ("Utility commands:" )
175
+ click .secho ("\n " .join (util_help ))
176
+ click .secho ()
150
177
151
178
# -- If there is a command, it is executed when this function is finished
152
179
# -- Debug: print the command invoked
0 commit comments