Permalink
Browse files

[list] arbitrary shorten too long synopsis lines

  • Loading branch information...
1 parent 7c877f2 commit 712bf51b37e2fd90c7eec453ae7e62f1a8f4389e @samoht samoht committed Oct 11, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/opamClient.ml
View
@@ -1121,6 +1121,12 @@ let indent_right s nb =
else
String.make nb ' ' ^ s
+let sub_at n s =
+ if String.length s <= n then
+ s
+ else
+ String.sub s 0 n
+
let s_not_installed = "--"
let unknown_package name version =
@@ -1206,7 +1212,7 @@ let list ~print_short ~installed_only ?(name_only = true) ?(case_sensitive = fal
OpamGlobals.msg "%s %s %s\n"
(indent_left name max_n)
(indent_right version max_v)
- synopsis
+ (sub_at 100 synopsis)
) names
let info package =

0 comments on commit 712bf51

Please sign in to comment.