diff --git a/src/cligen/template/cmd_help.ecr b/src/cligen/template/cmd_help.ecr index aa84e15..52ef103 100644 --- a/src/cligen/template/cmd_help.ecr +++ b/src/cligen/template/cmd_help.ecr @@ -3,6 +3,7 @@ Command: <%= @name %> Description: <%= @description %> <%- end -%> +<%- unless @flags.empty? -%> <%- len = @flags.map{|f| f.short.nil? ? f.long.size : "#{f.short},#{f.long}".size}.max + 5 -%> Flags: @@ -14,6 +15,7 @@ Flags: <%= "%-#{len}s %s" % [flag.long.strip, flag.description.strip] %> <%- end -%> +<%- end -%> <%- end -%> <%- unless @commands.empty? -%> Other Commands