File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
# !/usr/bin/fish
2
2
3
3
set -l ignores \
4
+ ' .git/' \
4
5
' node_modules/' \
5
6
' pnpm-lock.yaml' \
6
7
' package-lock.json' \
@@ -11,10 +12,16 @@ set -l ignore_flags
11
12
for p in $ignores
12
13
set -a ignore_flags --glob " !$p "
13
14
end
14
-
15
15
set -l ignore_str (string join ' ' $ignore_flags )
16
16
17
- set -l rg_cmd " rg -i --no-heading --line-number --color=always $ignore_str --"
17
+ set -l reload_cmd '
18
+ set -l q {q}
19
+ if test -n "$q "
20
+ rg -i --hidden --no-heading --line-number --color=always ' " $ignore_str " ' "$q "
21
+ else
22
+ printf ""
23
+ end
24
+ '
18
25
19
26
set -l preview_cmd '
20
27
set -l file {1}
@@ -31,9 +38,9 @@ set -l preview_cmd '
31
38
'
32
39
33
40
set -l match (
34
- fzf --ansi --disabled --prompt ' rg> ' \
41
+ printf " " | fzf --ansi --disabled --prompt ' rg> ' \
35
42
--delimiter : --nth =3.. \
36
- --bind " change:reload:$rg_cmd {q} || true " \
43
+ --bind " change:reload:$reload_cmd " \
37
44
--preview " $preview_cmd " \
38
45
--preview-window =down:wrap:70%
39
46
)
You can’t perform that action at this time.
0 commit comments