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

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

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

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

t-8ch opened this issue Nov 29, 2016 · 2 comments
Milestone

Comments

@t-8ch
Copy link
Contributor

@t-8ch 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
Copy link

@chrisaycock 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
Copy link
Member

@Carreau 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 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants