1
- # NOTE: DO NOT UPGRADE fzf > 0.50
1
+ ## NOTE: RECOMMENDED FZF VERSION >= 0.52.1
2
2
3
- With ` 0.51.0 ` fzf changed the Windows escaping sequence which causes issue when
4
- using certain special characters in ` live_grep ` , until
5
- https://github.com/junegunn/fzf/issues/3789 is resolved it is recommended to stay
6
- with fzf ` 0.50.0 ` .
3
+ ** To avoid issues with ` live_grep|live_grep_native ` and special characters upgrade your fzf
4
+ binary at the minimum to version 0.52.1**
5
+
6
+ - Any version <= 0.50 will work but have issues with ` live_grep_native `
7
+ ([ junegunn/fzf #3626 ] ( https://github.com/junegunn/fzf/issues/3626 ) ).
8
+
9
+ - Versions 0.51.0/0.52.0 should be avoided due to
10
+ [ junegunn/fzf #3789 ] ( https://github.com/junegunn/fzf/issues/3789 ) .
7
11
8
12
## Windows Known Issues and Limitations
9
13
@@ -23,42 +27,3 @@ string the same way a double quoted argument is treated, i.e. `'foo bar' != "foo
23
27
To avoid issues, make sure none of your ` cmd ` 's ` rg_opts ` , ` fd_opts ` , ` preview ` , etc
24
28
contains single hyphens that should be treated as quotes, this is probably the case
25
29
if you copied old fzf-lua defaults into your ` setup ` options.
26
-
27
- ### live_grep_native
28
-
29
- When using ` live_grep_native ` we are sending the ` rg ` command directly
30
- to fzf (without the fzf-lua wrapper) and are therefore bound by fzf's escaping
31
- requirements.
32
-
33
- For example, ` ^ ` is a special escape character on windows and also a regex special
34
- character. Say we wanted to search for all lines that start with "local", we would
35
- run:
36
- ``` lua
37
- -- we use `no_esc` to tell rg we're using a regex
38
- :FzfLua live_grep no_esc = true search =^ local
39
- ```
40
-
41
- However, when using the native version we need to escape the caret twice:
42
- ``` lua
43
- :FzfLua live_grep no_esc = true search =^^ local
44
- ```
45
-
46
- More so, I couldn't find a way to send special regex chars ` [(|.*^$ ` as the backslash
47
- is always doubled by fzf's ` {q} ` <sub ><sup >&ast ; see bottom note</sup ></sub >.
48
-
49
- For example, if we run:
50
- ``` cmd
51
- break | fzf --ansi --disabled --bind="change:reload:rg --line-number --column --color=always {q}"
52
- ```
53
-
54
- And try to search for the literal ` [ ` by typing ` \[ ` , we get the error:
55
- ```
56
- [Command failed: rg --line-number --column --color=always ^"\\[^"]
57
- ```
58
-
59
- If we double the backslashes by typing ` \\[ ` we get the error:
60
- ```
61
- [Command failed: rg --line-number --column --color=always ^"\\\\[^"]
62
- ```
63
-
64
- <sub ><sup >&ast ; upstream issue: https://github.com/junegunn/fzf/issues/3626 </sup ></sub >
0 commit comments