Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.inputrc magic-space breaks interactive mode #53957

Closed
stephenk mannequin opened this issue Sep 3, 2010 · 3 comments
Closed

.inputrc magic-space breaks interactive mode #53957

stephenk mannequin opened this issue Sep 3, 2010 · 3 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@stephenk
Copy link
Mannequin

stephenk mannequin commented Sep 3, 2010

BPO 9748
Nosy @amauryfa

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2010-09-07.11:07:25.416>
created_at = <Date 2010-09-03.02:11:16.761>
labels = ['type-bug', 'invalid']
title = '.inputrc magic-space breaks interactive mode'
updated_at = <Date 2010-09-07.11:07:25.415>
user = 'https://bugs.python.org/stephenk'

bugs.python.org fields:

activity = <Date 2010-09-07.11:07:25.415>
actor = 'amaury.forgeotdarc'
assignee = 'none'
closed = True
closed_date = <Date 2010-09-07.11:07:25.416>
closer = 'amaury.forgeotdarc'
components = ['None']
creation = <Date 2010-09-03.02:11:16.761>
creator = 'stephenk'
dependencies = []
files = []
hgrepos = []
issue_num = 9748
keywords = []
message_count = 3.0
messages = ['115412', '115670', '115675']
nosy_count = 2.0
nosy_names = ['amaury.forgeotdarc', 'stephenk']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue9748'
versions = ['Python 2.6', 'Python 3.1']

@stephenk stephenk mannequin added the type-bug An unexpected behavior, bug, or error label Sep 3, 2010
@stephenk
Copy link
Mannequin Author

stephenk mannequin commented Sep 3, 2010

Adding the following line to ~/.inputrc for bash commandline usage will break the python interactive interpreter. Specifically, you can no longer type "space" characters:

Space: magic-space

This is fairly serious for bash users, because once you've lived with magic-space you don't ever want to live without it.

This was tested under 2 different operating systems (Ubuntu 9.10, FreeBSD 6.0) and 3 different python versions, so the problem seems widespread.

@amauryfa
Copy link
Member

amauryfa commented Sep 5, 2010

I didn't know what "magic space" is. But a quick google search shows that it is specific to Bash.

in http://www.ukuug.org/events/linux2003/papers/bash_tips/#S16
"""
There are other readline-based programs without this feature, so make it only apply in Bash:

$if Bash
Space: magic-space
$endif

For example the MySQL client and the Perl debugger can also use the readline library.
"""

Python also uses the readline library; you should add the "$if Bash".

@stephenk
Copy link
Mannequin Author

stephenk mannequin commented Sep 5, 2010

Didn't know about the inputrc conditional; that works. I verified that magic-space (without the conditional) also interferes with mysql, so this seems like less of an oversight on the side of python and more of a bash-user-beware situation.

Anyway, thanks for the workaround!

@amauryfa amauryfa closed this as completed Sep 7, 2010
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant