method command_line_args ~section_separator =
let print = Format.fprintf Format.str_formatter in
let result = ref [] in let push x = result := x :: !result in
let rec iter = function
| _, Immediate cp ->
let key = "-" ^ String.concat section_separator cp#get_name in
let spec = cp#get_spec in
let doc = (
print "@[<hv5>";
Format.pp_print_as Format.str_formatter (String.length key +3) "";
if cp#get_help <> ""
then (print "@,@[<b2>"; cp#get_help_formatted Format.str_formatter; print "@]@ ")
else print "@,";
print "@[<hv>@[current:@;<1 2>@[<hov1>"; cp#get_formatted Format.str_formatter;
print "@]@],@ @[default:@;<1 2>@[<b2>"; cp#get_default_formatted Format.str_formatter;
print "@]@]@]@]";
Format.flush_str_formatter ()) in
(match cp#get_short_name with
| None -> ()
| Some short_name -> push ("-" ^ short_name,spec,""));
push (key,spec,doc)
| _, Subsection queue -> Queue.iter iter queue in
Queue.iter iter cps;
List.rev !result