Fix REPL completions on OS X
This commit is contained in:
parent
63a9e35f7f
commit
1b7d7bcef7
@ -26,6 +26,7 @@
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
import os
|
||||
import sys
|
||||
from contextlib import contextmanager
|
||||
|
||||
docomplete = True
|
||||
@ -40,6 +41,12 @@ except ImportError:
|
||||
except ImportError:
|
||||
docomplete = False
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
readline_bind = "bind ^I rl_complete"
|
||||
else:
|
||||
readline_bind = "tab: complete"
|
||||
|
||||
|
||||
import hy.macros
|
||||
import hy.compiler
|
||||
|
||||
@ -94,7 +101,7 @@ def completion(completer=None):
|
||||
except IOError:
|
||||
open(history, 'a').close()
|
||||
|
||||
readline.parse_and_bind("tab: complete")
|
||||
readline.parse_and_bind(readline_bind)
|
||||
|
||||
yield
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user