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

Platform-resembling path escaping for the FilenameCompleter #113

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

klemens
Copy link

@klemens klemens commented Feb 13, 2017

As suggested in #106 by @gwenn, this replaces the escaping logic that only works for unix with the shell_escape crate, which uses single quotes on unix and double quotes on windows for "escaping". To parse these quoted strings, I wrote the crate cmdline_parser, which supports all possible escaping styles on unix and windows (single quotes, double quotes, backslash-escaping).

Open questions:

  • Should we use backslash escaping instead of quoting on unix, because this is was shell usually do by default?
  • Should DEFAULT_BREAK_CHARS really contain that many separators by default or should we stick to spaces and tabs and let the user customize it?

Use the crate shell_escape to do the escaping in a platform specific manner
(currently single quotes on unix and double quotes on windows) if necessary.
The crate cmdline_parser is used to parse the escaped lines back into the
individual arguments to do the actual path completion.
The ? operator was stabilized in 1.13.
klemens added a commit to klemens/2i-emulator that referenced this pull request Mar 16, 2017
The fork includes the new path escaping implementation [1] that is not yet
part of the upstream repository.

[1]: kkawakam/rustyline#113
gwenn pushed a commit to gwenn/rustyline that referenced this pull request Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant