Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/commoncode/cliutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# See https://aboutcode.org for more information about nexB OSS projects.
#

import shutil
import sys

import click
Expand Down Expand Up @@ -353,7 +354,7 @@ def file_name_max_len(used_width=BAR_WIDTH + 1 + 7 + 1 + 8 + 1):
The space usage is therefore:
BAR_WIDTH + 1 + 7 + 1 + 8 + 1 + the file name length
"""
term_width, _height = click.get_terminal_size()
term_width, _height = shutil.get_terminal_size()
max_filename_length = term_width - used_width
return max_filename_length

Expand Down