Commit 0f87ed5
committed
Fix don't quote prompt when
I already have a keymap to quote the prompt, so my current workflow is:
type query-> Quote prompt -> Start adding options
However I would like to create keymaps for some common options I use,
currently this not possible because when `quote_char` is emtpy, it still adds
backslashes before each character in prompt, and this breaks the search pattern
Usecase is for chaining mulitple `rg` options without, quoting
the prompt mulitple times, which is not the expected behavior when
`quote_char` is empty string.
E.g Consider this keymap
```lua
["<C-;>"] = require("telescope-live-grep-args.actions").quote_prompt {
postfix = " --word-regexp ",
quote_char = "",
}
```
And I search for `tab`, then pressing `<C-;>`:
Before:
```
\"\t\a\b\"\ --word-regexp
```
After:
```
"tab" --word-regexp
```quote_char is empty string1 parent 0f75ea8 commit 0f87ed5
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
0 commit comments