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

Error with counsel-locate when using zsh as login shell #194

Closed
makkus opened this issue Aug 7, 2015 · 2 comments
Closed

Error with counsel-locate when using zsh as login shell #194

makkus opened this issue Aug 7, 2015 · 2 comments

Comments

@makkus
Copy link

@makkus makkus commented Aug 7, 2015

As per title, counsel-locate prints "Error" as soon as a regex is created. I.e. "abc" as input is fine, but not "abc abc".
I think it's because of how one needs to escape most characters in zsh ('.', '*', '?', ...), and those are used in counsel-locate when a regex is created, in addition to '(' and ')', which are escaped as far as I could see.
Might be overlooking something here, but wouldn't just enclose the regex between ' be enough?

@abo-abo abo-abo closed this in c9235c8 Aug 7, 2015
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Aug 7, 2015

Here's the shell command that is run for abc abc:

locate -i --regex \\(abc\\).*?\\(abc\\)

I've now changed it to:

locate -i --regex '(abc).*?(abc)'

Please check if it works fine for you.

@makkus
Copy link
Author

@makkus makkus commented Aug 8, 2015

Yup, that works. First one errors out with:

$ locate -i --regex (abc).*?(abc)
zsh: number expected

Second one returns some results.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.