@@ -18,8 +18,10 @@ Live grep args picker for [telescope.nvim](https://github.com/nvim-telescope/tel
1818It enables passing arguments to the grep command, ` rg ` examples:
1919
2020- ` foo ` → press ` <C-k> ` → ` "foo" ` → ` "foo" -tmd `
21+ - Only works if you set up the ` <C-k> ` mapping
2122- ` --no-ignore foo `
2223- ` "foo bar" bazdir `
24+ - ` "foo" --iglob **/bar/** `
2325
2426Find the full [ ripgrep guide] ( https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md ) here to find out what is possible.
2527
@@ -70,13 +72,6 @@ Call live grep args:
7072
7173## Usage
7274
73- ### Mappings
74-
75- | Mappings | Action |
76- | --- | --- |
77- | ` <C-k> ` | Quote prompt, e.g. ` foo ` → ` "foo" ` |
78-
79-
8075### Grep argument examples
8176
8277(Some examples are ripgrep specific)
@@ -86,6 +81,7 @@ Call live grep args:
8681| ` foo bar ` | ` foo bar ` | search for „foo bar“ |
8782| ` "foo bar" baz ` | ` foo bar ` , ` baz ` | search for „foo bar“ in dir „baz“ |
8883| ` --no-ignore "foo bar ` | ` --no-ignore ` , ` foo bar ` | search for „foo bar“ ignoring ignores |
84+ | ` "foo" --iglob **/test/** ` | search for „foo“ in any „test“ path |
8985| ` "foo" ../other-project ` | ` foo ` , ` ../other-project ` | search for „foo“ in ` ../other-project ` |
9086
9187If the prompt value does not begin with ` ' ` , ` " ` or ` - ` the entire prompt is treated as a single argument.
@@ -102,13 +98,13 @@ telescope.setup {
10298 extensions = {
10399 live_grep_args = {
104100 auto_quoting = true , -- enable/disable auto-quoting
105- -- override default mappings
106- -- default_mappings = {},
101+ -- define mappings, e.g.
107102 mappings = { -- extend mappings
108103 i = {
109104 [" <C-k>" ] = lga_actions .quote_prompt (),
110- }
111- }
105+ [" <C-i>" ] = lga_actions .quote_prompt ({ postfix = " --iglob " }),
106+ },
107+ },
112108 -- ... also accepts theme settings, for example:
113109 -- theme = "dropdown", -- use dropdown theme
114110 -- theme = { }, -- use own theme spec
0 commit comments