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

Disable escaping of chars in live grep #604

Closed
Kazy opened this issue Mar 4, 2021 · 6 comments
Closed

Disable escaping of chars in live grep #604

Kazy opened this issue Mar 4, 2021 · 6 comments
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@Kazy
Copy link

Kazy commented Mar 4, 2021

Hello !

When using live grep, some characters (see https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/files.lua#L19) are escaped from the prompt (see https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/files.lua#L50), in particular *. This makes using regex patterns impossible for searching impossible.

Could it be possible to disable it/would you be open to such an option, or is there a strong reason to escape them ?

Thanks !

@Kazy Kazy added the enhancement Enhancement to performance, inner workings or existent features label Mar 4, 2021
@Conni2461
Copy link
Member

If i recall correctly it completely broke live_grep but we could re-enable for grep_string.

CC @elianiva

@elianiva
Copy link
Member

elianiva commented Mar 4, 2021

yeah, it broke live_grep if it's not a complete regex. e.g if you type ( instead of ().
I think we could remove it for grep_string, it's doing fine without escape_chars

@zygous
Copy link

zygous commented Mar 19, 2021

I too would like a nice way to search using a regex instead of just a string. I've no strong opinions on how that should work, but "grep" is a misnomer without it. live_grep is nice but not powerful enough.

@Conni2461
Copy link
Member

See #670

@elianiva elianiva linked a pull request Mar 31, 2021 that will close this issue
7 tasks
@languitar
Copy link

Before telescope I was using clap. There, grepping simply stopped and showed an error message until the syntax of the regex was fixed. That was actually pretty usable that way.

@Conni2461
Copy link
Member

We no longer escape them for quite some time. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants