Skip to content

Commit

Permalink
[list] arbitrary shorten too long synopsis lines
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Oct 11, 2012
1 parent 7c877f2 commit 712bf51
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/opamClient.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 712bf51

Please sign in to comment.