summaryrefslogtreecommitdiffstats
path: root/stdlib/arg.ml
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/arg.ml')
-rw-r--r--stdlib/arg.ml9
1 files changed, 5 insertions, 4 deletions
diff --git a/stdlib/arg.ml b/stdlib/arg.ml
index d5d1bdf74..d19f89056 100644
--- a/stdlib/arg.ml
+++ b/stdlib/arg.ml
@@ -64,10 +64,11 @@ let make_symlist prefix sep suffix l =
;;
let print_spec buf (key, spec, doc) =
- match spec with
- | Symbol (l, _) -> bprintf buf " %s %s%s\n" key (make_symlist "{" "|" "}" l)
- doc
- | _ -> bprintf buf " %s %s\n" key doc
+ if String.length doc > 0 then
+ match spec with
+ | Symbol (l, _) -> bprintf buf " %s %s%s\n" key (make_symlist "{" "|" "}" l)
+ doc
+ | _ -> bprintf buf " %s %s\n" key doc
;;
let help_action () = raise (Stop (Unknown "-help"));;