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

search git search status doesn’t work for files with spaces #220

Closed
PatrickF1 opened this issue Feb 5, 2022 · 0 comments · Fixed by #230
Closed

search git search status doesn’t work for files with spaces #220

PatrickF1 opened this issue Feb 5, 2022 · 0 comments · Fixed by #230

Comments

@PatrickF1
Copy link
Owner

PatrickF1 commented Feb 5, 2022

Describe the bug

The file paths outputted by git status, when there is a space in the path, are not valid. They contain an extra layer of quotes.

Steps to reproduce

touch "a b.txt"
select "a b.txt" in search git status
notice the output is '"a b.txt"', and if you try to cat it you'll get cat: "a b.txt": No such file or directory

Comments

Looking for contributors to fix this one! @kidonng if you're interested 😉
The test tests/search_git_status/outputs_right_paths.fish will also need to be updated. It attempts to test paths with spaces but it's not catching the bug :(

@PatrickF1 PatrickF1 changed the title search git status adds too many layers of quotes to paths with spaces search git search status doesn’t work for files with spaces Feb 5, 2022
PatrickF1 added a commit that referenced this issue Mar 19, 2022
This fixes a bug where file paths outputted by search git status include an extra layer of single quotes if the path includes a space. Turns out this is because we string escape all our paths before writing them to the command line but git status already string escapes paths with spaces.

Fixes #220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant