Open pombredanne opened 8 years ago
We have two different completers:
prompt_toolkit.contrib.completers.filesystem.PathCompleter
: This one expects the whole input to be a path. So a space in the input maps to a space in the path. A quote in the input maps to a quote in the path.prompt_toolkit.contrib.completers.system.SystemCompleter
: This one defines a regular grammar for a shell command. (An approximation.) This one tries to make sense of the quotes, does proper unquoting and calls PathCompleter
on that fraction of the input. If PathCompleter
returns something that has to be quoted again, this grammar will do the escaping.I'm not sure about which completer you experience issues.
However. I just noticed that SystemCompleter
doesn't understand that the executable (the first parameter) can also be quoted. This needs to be fixed.
Jonathan
Once you have selected a path segment with spaces, completion stops. The issue is about likely quoting and un-quoting the path (with os-specific rules) or about the fact I use a grammar-based completer.
I will come with tests first.