Skip to content

Commit b00fae4

Browse files
committed
Update _pythonrc.py
1 parent f6dd3f2 commit b00fae4

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎_pythonrc.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
except ImportError:
1515
print("You need readline, rlcompleter, and atexit")
1616

17-
readline.parse_and_bind("tab: complete")
18-
# this is needed for OSX, doesn't work in Linux
19-
#readline.parse_and_bind ("bind ^I rl_complete")
17+
18+
# Make this work properly in Darwin and Linux
19+
if 'libedit' in readline.__doc__:
20+
readline.parse_and_bind("bind ^I rl_complete")
21+
else:
22+
readline.parse_and_bind("tab: complete")
2023

2124
class Completer(object):
2225
def __init__(self):

0 commit comments

Comments
 (0)