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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Aug 7, 2015

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@makkus

makkus Aug 8, 2015

Yup, that works. First one errors out with:

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

Second one returns some results.

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