@@ -182,25 +182,28 @@ where
182
182
fn print_grouped_help ( ) {
183
183
use clap:: CommandFactory ;
184
184
use std:: collections:: HashSet ;
185
-
185
+
186
186
let cmd = Args :: command ( ) ;
187
187
let subcommands: Vec < _ > = cmd. get_subcommands ( ) . collect ( ) ;
188
-
188
+
189
189
// Define command groupings and their order (excluding MISC)
190
190
let groups = [
191
191
( "INSPECTION" , vec ! [ "log" , "status" ] ) ,
192
- ( "STACK OPERATIONS" , vec ! [ "commit" , "new" , "describe" , "branch" ] ) ,
192
+ (
193
+ "STACK OPERATIONS" ,
194
+ vec ! [ "commit" , "rub" , "new" , "describe" , "branch" ] ,
195
+ ) ,
193
196
( "OPERATION HISTORY" , vec ! [ "oplog" , "undo" , "restore" ] ) ,
194
197
] ;
195
-
198
+
196
199
println ! ( "A GitButler CLI tool" ) ;
197
200
println ! ( ) ;
198
201
println ! ( "Usage: but [OPTIONS] <COMMAND>" ) ;
199
202
println ! ( ) ;
200
-
203
+
201
204
// Keep track of which commands we've already printed
202
205
let mut printed_commands = HashSet :: new ( ) ;
203
-
206
+
204
207
// Print grouped commands
205
208
for ( group_name, command_names) in & groups {
206
209
println ! ( "{}:" , group_name) ;
@@ -213,13 +216,13 @@ fn print_grouped_help() {
213
216
}
214
217
println ! ( ) ;
215
218
}
216
-
219
+
217
220
// Collect any remaining commands not in the explicit groups
218
221
let misc_commands: Vec < _ > = subcommands
219
222
. iter ( )
220
223
. filter ( |subcmd| !printed_commands. contains ( subcmd. get_name ( ) ) && !subcmd. is_hide_set ( ) )
221
224
. collect ( ) ;
222
-
225
+
223
226
// Print MISC section if there are any ungrouped commands
224
227
if !misc_commands. is_empty ( ) {
225
228
println ! ( "MISC:" ) ;
@@ -229,7 +232,7 @@ fn print_grouped_help() {
229
232
}
230
233
println ! ( ) ;
231
234
}
232
-
235
+
233
236
println ! ( "Options:" ) ;
234
237
println ! (
235
238
" -C, --current-dir <PATH> Run as if gitbutler-cli was started in PATH instead of the current working directory [default: .]"
0 commit comments