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

Windows quote issue with sed in counsel-cmd-to-dired #1441

Closed
glucas opened this issue Feb 8, 2018 · 3 comments
Closed

Windows quote issue with sed in counsel-cmd-to-dired #1441

glucas opened this issue Feb 8, 2018 · 3 comments

Comments

@glucas
Copy link
Contributor

@glucas glucas commented Feb 8, 2018

While trying out counsel-find-file-occur on Windows I was getting this error:

sed: -e expression #1, char 0: no previous regular expression

After debugging a bit, the problem is with counsel-cmd-to-dired and its use of sed. If I replace the single quotes with escaped double-quotes then things work as expected:

        (full-cmd (format "%s %s | sed -e \"s/^/  /\""

Perhaps this is something that can be made platform-specific.

@glucas
Copy link
Contributor Author

@glucas glucas commented Feb 8, 2018

Ah, I also had to tweak the xargs delimiter in counsel-find-file-occur to get it working:

(format "ls | grep -i -E '%s' | xargs -d '\\n' ls" 

@abo-abo abo-abo closed this in 0d2823e Feb 9, 2018
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Feb 9, 2018

Thanks for the pointers. Your changes work for me on Linux. Let me know if this change fixes your issue.

@glucas
Copy link
Contributor Author

@glucas glucas commented Feb 18, 2018

Yes, the changes work for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants