diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-05-07 14:13:36 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-05-07 14:13:36 -0400 |
commit | 64f25c5ffcea9e57188e5b38fa52301fa7c21139 (patch) | |
tree | b2dd1ea0b4d15276d1eb13d19b91046111b1130b /cmd2/rl_utils.py | |
parent | bfdb482341efae823016ae7b1799cad06104309d (diff) | |
download | cmd2-git-64f25c5ffcea9e57188e5b38fa52301fa7c21139.tar.gz |
Added warning if tab completion will be disabled. Not allowing libedit
Diffstat (limited to 'cmd2/rl_utils.py')
-rw-r--r-- | cmd2/rl_utils.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd2/rl_utils.py b/cmd2/rl_utils.py index 465fcaea..8ef65d28 100644 --- a/cmd2/rl_utils.py +++ b/cmd2/rl_utils.py @@ -34,11 +34,13 @@ if 'pyreadline' in sys.modules: rl_type = RlType.PYREADLINE elif 'gnureadline' in sys.modules or 'readline' in sys.modules: - rl_type = RlType.GNU + # We don't support libedit + if 'libedit' not in readline.__doc__: + rl_type = RlType.GNU - # Load the readline lib so we can access members of it - import ctypes - readline_lib = ctypes.CDLL(readline.__file__) + # Load the readline lib so we can access members of it + import ctypes + readline_lib = ctypes.CDLL(readline.__file__) def rl_force_redisplay() -> None: |