-
Notifications
You must be signed in to change notification settings - Fork 40
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
Allow to parse search phrase in quotes "as is" #54
Comments
mambusskruj
changed the title
Allow to parse dashes in quotes "as is"
Allow to parse search phrase quotes "as is"
Apr 4, 2023
mambusskruj
changed the title
Allow to parse search phrase quotes "as is"
Allow to parse search phrase in quotes "as is"
Apr 4, 2023
You need to tell the program to stop parsing the options list, i.e. You can use this function instead of the default local action_state = require("telescope.actions.state")
local function quote_prompt(bufnr)
local picker = action_state.get_current_picker(bufnr)
local prompt = picker:_get_prompt()
prompt = vim.trim(prompt)
prompt = "-- \"" .. prompt:gsub("\"", "\\\"") .. "\""
picker:set_prompt(prompt)
vim.cmd.normal{ "I", bang = true }
end lga.mp4 |
@notpeelz wow, thank you so much! |
I have re-opened the issue. Searching for |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Let's say I want to search for parameter
--jobs
in files. And for that I need to escape dashes with backslashes even while I use quotes for search phrase (like this"\-\-jobs"
).So I propose to parse characters "as is" in quotes for search phrase.
Example: for
"--jobs"
prompt -> search phrase will be--jobs
The text was updated successfully, but these errors were encountered: