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

Filename completion with quotes in filename does not escape the quotes #10069

Closed
t-8ch opened this Issue Nov 29, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@t-8ch
Contributor

t-8ch commented Nov 29, 2016

When completing filenames containing quotes those are completed verbatim, closing the string.
The user has to go back in the string to escape the quotes manually.

$ touch /tmp/foo\'bar
$ ipython
In [1]: open('/tmp/foo<TAB>
# actual
In [1]: open('/tmp/foo'bar
# Expected:
In [1]: open('/tmp/foo\'bar
{'commit_hash': '3a3686a',
 'commit_source': 'repository',
 'default_encoding': 'UTF-8',
 'ipython_path': '/home/t-8ch/Projekte/ipython/IPython',
 'ipython_version': '6.0.0.dev',
 'os_name': 'posix',
 'platform': 'Linux-4.8.10-1-ARCH-x86_64-with-arch',
 'sys_executable': '/home/t-8ch/.local/share/virtualenvs/ipython/bin/python',
 'sys_platform': 'linux',
 'sys_version': '3.5.2 (default, Nov  7 2016, 11:31:36) \n[GCC 6.2.1 20160830]'}
@chrisaycock

This comment has been minimized.

Show comment
Hide comment
@chrisaycock

chrisaycock May 11, 2017

Windows escapes a string by wrapping it with a double quote. In particular, Windows is only concerned with spaces in a string.

So what does that mean for the sample string? Are the surrounding single quotes replaced by double quotes? I'm not sure how to interpret this.

@Carreau says we should only protect on non-Windows.

chrisaycock commented May 11, 2017

Windows escapes a string by wrapping it with a double quote. In particular, Windows is only concerned with spaces in a string.

So what does that mean for the sample string? Are the surrounding single quotes replaced by double quotes? I'm not sure how to interpret this.

@Carreau says we should only protect on non-Windows.

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau May 11, 2017

Member

@Carreau says we should only protect on non-Windows.

not sure for "should", but if we are unsure we can always improve the experience on unix-like without changing the experience on windows, and decide about the windows codepath later :-)

Member

Carreau commented May 11, 2017

@Carreau says we should only protect on non-Windows.

not sure for "should", but if we are unsure we can always improve the experience on unix-like without changing the experience on windows, and decide about the windows codepath later :-)

@Carreau Carreau closed this in #10533 May 11, 2017

@Carreau Carreau added this to the 6.1 milestone May 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment