withfig / autocomplete

IDE-style autocomplete for your existing terminal & shell
https://fig.io
MIT License
24.39k stars 5.4k forks source link

[cd] spaces aren't escaped in cd's suggestions #2318

Closed cpendery closed 1 month ago

cpendery commented 2 months ago

Sanity checks

What CLI tool does this relate to?

cd

Which statement makes the most sense?

There is a bug with this completion spec

Issue Details

When suggesting a path for cd with spaces in in the folder, fig doesn't include the escapes in the insertValue.

mschrage commented 1 month ago

Thanks for reporting this @cpendery! In this case, escaping should be implemented by the "autocomplete engine" rather than the completion spec. [Obviously, this is not documented anywhere. We should really codify these expectations!]

cc @grant0417

grant0417 commented 1 month ago

Hey @cpendery can you give an example? Recording a video or photo would help here.

cpendery commented 1 month ago

I was just looking at the filepath generator and saw that the output of a path like /home/user 1/ wouldn't be escaped, it's good to know it's happening on the engine side rather than the spec side. Closing as completed