Open jhclark opened 10 years ago
No hating - if nobody reported issues, then it was trivially easy or nobody is using it.
I'm not perfectly happy with the current state, but I have played with this some. Currently if all completions are quoted, you'll get the quote. There's this annoying ProgramData directory that doesn't needs quotes, otherwise you'd see a quote.
Maybe I need a better heuristic, like if more completions have quotes than not, add the quote. I vaguely recall examples where always adding the quote would have been annoying.
Hm, I'm still leaning toward the "add quotes for the sake of the one file/directory with spaces" heuristic.
I'm having a hard time thinking up any examples where adding the quote would be annoying, since auto-complete seems to behave pretty reasonably inside quotes. Also, I think the powershell parser will typically strip them before passing the string to a subprocess or commandlet. (*Based on my limited knowledge of the interpreter). A specific example might help.
Updated the PR description to make the ask clear.
In
Emacs
mode.(1) type
cd C:\Program<tab>
, you will get a list of completions as follows:(2) type
<space>f
, then<tab>
cd 'C:\Program
, so that pressing tab at (2) will display further completions as incd 'C:\Program Files'
Also, please don't hate me for flooding the issue tracker. :)