summaryrefslogtreecommitdiff
path: root/cmd2/argparse_completer.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-01-09 22:45:53 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2020-01-09 22:45:53 -0500
commit591bd29cb4a3bcb9b1f40ffc1f30429c6501ebdb (patch)
tree46c1e3af762c9cb222c6ae90bf0446d6eca4b388 /cmd2/argparse_completer.py
parent10b844809e3a9500274dc4af4e780708975ba905 (diff)
parentd4556962799e68ea4d54ff86186428d17edcaef9 (diff)
downloadcmd2-git-591bd29cb4a3bcb9b1f40ffc1f30429c6501ebdb.tar.gz
Merge branch 'master' into generating_output_docs
# Conflicts: # docs/features/generating_output.rst # docs/features/settings.rst
Diffstat (limited to 'cmd2/argparse_completer.py')
-rw-r--r--cmd2/argparse_completer.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py
index a2690dd0..23fd930e 100644
--- a/cmd2/argparse_completer.py
+++ b/cmd2/argparse_completer.py
@@ -444,11 +444,11 @@ class AutoCompleter(object):
completions.sort(key=self._cmd2_app.default_sort_key)
self._cmd2_app.matches_sorted = True
- token_width = ansi.ansi_safe_wcswidth(action.dest)
+ token_width = ansi.style_aware_wcswidth(action.dest)
completions_with_desc = []
for item in completions:
- item_width = ansi.ansi_safe_wcswidth(item)
+ item_width = ansi.style_aware_wcswidth(item)
if item_width > token_width:
token_width = item_width
@@ -585,7 +585,7 @@ class AutoCompleter(object):
def _print_message(msg: str) -> None:
"""Print a message instead of tab completions and redraw the prompt and input line"""
import sys
- ansi.ansi_aware_write(sys.stdout, msg + '\n')
+ ansi.style_aware_write(sys.stdout, msg + '\n')
rl_force_redisplay()
def _print_arg_hint(self, arg_action: argparse.Action) -> None: