File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change
1
+ import logging
1
2
import readline
2
3
from functools import lru_cache
3
4
from pathlib import Path
4
5
5
6
from .commands import CMDFIX , COMMANDS
6
7
8
+ logger = logging .getLogger (__name__ )
9
+
7
10
8
11
def register_tabcomplete () -> None :
9
12
"""Register tab completion for readline."""
10
13
11
14
# set up tab completion
12
- print ("Setting up tab completion" )
15
+ logger . debug ("Setting up tab completion" )
13
16
readline .set_completer (_completer )
14
17
readline .set_completer_delims (" " )
15
18
readline .parse_and_bind ("tab: complete" )
16
19
17
20
# https://github.com/python/cpython/issues/102130#issuecomment-1439242363
18
21
if "libedit" in readline .__doc__ : # type: ignore
19
- print ("Found libedit readline" )
22
+ logger . debug ("Found libedit readline" )
20
23
readline .parse_and_bind ("bind ^I rl_complete" )
21
24
else :
22
- print ("Found gnu readline" )
25
+ logger . debug ("Found gnu readline" )
23
26
readline .parse_and_bind ("tab: complete" )
24
27
25
28
You can’t perform that action at this time.
0 commit comments