diff options
| author | Georg Brandl <georg@python.org> | 2014-03-01 08:14:38 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2014-03-01 08:14:38 +0100 |
| commit | 4047fe8184c2984241b92754b6e6d6b639b8d09b (patch) | |
| tree | 581c9cf0ad553038071b022faf41d8e8446bc05d /sphinx | |
| parent | 8dacc522bc3004d6a22eef5fce71272798ffe778 (diff) | |
| parent | ab4172f8d0f70e3d1d2590cbc6a7587cd8d35624 (diff) | |
| download | sphinx-4047fe8184c2984241b92754b6e6d6b639b8d09b.tar.gz | |
Merged in wvi/sphinx/quick-start-readline (pull request #225)
sphinx-quickstart readline editing on input
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/quickstart.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index 3c821ebc..a7d20df9 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -16,6 +16,16 @@ from io import open TERM_ENCODING = getattr(sys.stdin, 'encoding', None) +#try to import readline, unix specific enhancement +try: + import readline + if 'libedit' in readline.__doc__: + readline.parse_and_bind("bind ^I rl_complete") + else: + readline.parse_and_bind("tab: complete") +except ImportError: + pass + from docutils.utils import column_width from sphinx import __version__ |
