[cd] spaces aren't escaped in cd's suggestions
cpendery opened this issue · comments
Sanity checks
- My issue relates to a specific CLI completion spec (e.g.
git checkout
is missing options ingit
completion spec). If your issue is more general, please create your issue here: withfig/fig - I have searched github.com/withfig/autocomplete/issues and there are no duplicates of my issue
- I would like to work on this.
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.
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
Hey @cpendery can you give an example? Recording a video or photo would help here.
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