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

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

Closed
2 of 3 tasks
cpendery opened this issue Apr 12, 2024 · 3 comments
Closed
2 of 3 tasks

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

cpendery opened this issue Apr 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@cpendery
Copy link
Contributor

Sanity checks

  • My issue relates to a specific CLI completion spec (e.g. git checkout is missing options in git 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.

@mschrage mschrage added bug Something isn't working and removed NEED_TO_LABEL labels May 6, 2024
@mschrage
Copy link
Member

mschrage commented May 6, 2024

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
Copy link
Member

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

@cpendery
Copy link
Contributor Author

cpendery commented May 7, 2024

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

@cpendery cpendery closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants