Fixes #460: Do not show variants by default in spack find.
This does two things: 1. By default `spack find` no longer shows variants. You have to supply `-v` to get that 2. This improves the `colify` implementation so that it no longer pads the rightmost column. This avoids the issue where if one spec was too long in the output, *all* specs would have space padding added to that width, and it would look like the output of `spack find` was double spaced. This no longer happens -- the one bad line wraps around and the other lines are now single-spaced when you use `-v` with boost.
This commit is contained in:
@@ -198,8 +198,13 @@ def colify(elts, **options):
|
||||
for col in xrange(cols):
|
||||
elt = col * rows + row
|
||||
width = config.widths[col] + cextra(elts[elt])
|
||||
fmt = '%%-%ds' % width
|
||||
output.write(fmt % elts[elt])
|
||||
if col < cols - 1:
|
||||
fmt = '%%-%ds' % width
|
||||
output.write(fmt % elts[elt])
|
||||
else:
|
||||
# Don't pad the rightmost column (sapces can wrap on
|
||||
# small teriminals if one line is overlong)
|
||||
output.write(elts[elt])
|
||||
|
||||
output.write("\n")
|
||||
row += 1
|
||||
|
Reference in New Issue
Block a user