diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-06-16 02:55:33 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-06-16 02:55:33 -0700 |
commit | 17b868381f95fa324f7c6327c0977b303975de76 (patch) | |
tree | 5d73c51cc5551529b78a76bfafe9bb10b17cca7d /lib/spack/llnl/util/tty/colify.py | |
parent | 88b671f8b1a82ec9d9365c296d77e251a821a66c (diff) | |
download | spack-17b868381f95fa324f7c6327c0977b303975de76.tar.gz spack-17b868381f95fa324f7c6327c0977b303975de76.tar.bz2 spack-17b868381f95fa324f7c6327c0977b303975de76.tar.xz spack-17b868381f95fa324f7c6327c0977b303975de76.zip |
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.
Diffstat (limited to 'lib/spack/llnl/util/tty/colify.py')
-rw-r--r-- | lib/spack/llnl/util/tty/colify.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/spack/llnl/util/tty/colify.py b/lib/spack/llnl/util/tty/colify.py index 429ba45882..81a83691d7 100644 --- a/lib/spack/llnl/util/tty/colify.py +++ b/lib/spack/llnl/util/tty/colify.py @@ -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 |