diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-06 18:03:12 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-06 18:03:12 -0400 |
commit | f8f06bff169dca1f0c6ee1dbb2d61c347490b3bb (patch) | |
tree | 85c15a4b96b4eb8dca48b9fdab2102528ba1569a /cmd2/argparse_completer.py | |
parent | 9eed45b2c54a058f2ce4e448148e5ed99c0d7925 (diff) | |
download | cmd2-git-f8f06bff169dca1f0c6ee1dbb2d61c347490b3bb.tar.gz |
More unit tests
Diffstat (limited to 'cmd2/argparse_completer.py')
-rw-r--r-- | cmd2/argparse_completer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py index 0e9321db..b6d22dce 100644 --- a/cmd2/argparse_completer.py +++ b/cmd2/argparse_completer.py @@ -59,7 +59,7 @@ How to supply completion choice lists or functions for sub-commands: """ import argparse -import os +import shutil from typing import List, Union from . import utils @@ -504,7 +504,7 @@ class AutoCompleter(object): if item_width > token_width: token_width = item_width - term_size = os.get_terminal_size() + term_size = shutil.get_terminal_size() fill_width = int(term_size.columns * .6) - (token_width + 2) for item in completions: entry = '{: <{token_width}}{: <{fill_width}}'.format(item, item.description, |