mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 09:03:43 -05:00
Updated Examples (markdown)
@@ -295,10 +295,10 @@ fif() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
# alternative using ripgrep-all (rga) combined with preview
|
# alternative using ripgrep-all (rga) combined with preview
|
||||||
# allows to search in PDFs, E-Books, Office documents, zip, tar.gz, etc. (see https://github.com/phiresky/ripgrep-all)
|
# allows to search in PDFs, E-Books, Office documents, zip, tar.gz, etc. (see https://github.com/phiresky/ripgrep-all)
|
||||||
# find-in-file - usage: fif <searchTerm>
|
# find-in-file - usage: fif <searchTerm>
|
||||||
```sh
|
|
||||||
fif() {
|
fif() {
|
||||||
if [ ! "$#" -gt 0 ]; then echo "Need a string to search for!"; return 1; fi
|
if [ ! "$#" -gt 0 ]; then echo "Need a string to search for!"; return 1; fi
|
||||||
rga --ignore-case --files-with-matches --no-messages "$1" | fzf-tmux --preview "highlight -O ansi -l {} 2> /dev/null | rga --ignore-case --pretty --context 10 "$1" {}"
|
rga --ignore-case --files-with-matches --no-messages "$1" | fzf-tmux --preview "highlight -O ansi -l {} 2> /dev/null | rga --ignore-case --pretty --context 10 "$1" {}"
|
||||||
|
|||||||
Reference in New Issue
Block a user