Appropriate modules now take the terminal width into consideration.

This commit is contained in:
Adam Waldenberg 2012-05-24 02:00:24 +02:00
parent 1e8e60574f
commit 706dd6c07a
2 changed files with 5 additions and 2 deletions

View File

@ -47,4 +47,5 @@ def output():
print "specified exclusion patterns:"
for i in __filtered_files__:
print i
(width, _) = terminal.get_size()
print "...%s" % i[-width+3:] if len(i) > width else i

View File

@ -18,6 +18,7 @@
# along with gitinspector. If not, see <http://www.gnu.org/licenses/>.
import os
import terminal
__checkout_missing__ = False
__missing_files__ = set()
@ -42,4 +43,5 @@ def output():
print "either checkout manually using git or use the -c option in gitinspector:"
for missing in __missing_files__:
print missing
(width, _) = terminal.get_size()
print "...%s" % missing[-width+3:] if len(missing) > width else missing