So I might aswell ask here: I want to search for a string using ripgrep, select one of the files from the result list using FZF and then open the selected file with VS code. > rg . | fzf How do I do this on windows (NOT Linux)?? *Note:* Assume I already have ripgrep, FZF & VS Code installed.
So you've installed `fzf` – now what?
231–240 of 292 posts
Re: So you've installed `fzf` – now what?
#232Which has done wonders for my memory :D
(You _can_ cycle through past entries, but will check this out as list does sound way better + the menus people are describing here sound interesting)
Re: So you've installed `fzf` – now what?
#233The meaning of find . '/' Was not immediately apparent to me. It will first search the current directory, then search from the root directory of the filesystem. This is useful (beyond just `find` which is implicitly `find .`) because it will turn up local results quickly and global results eventually.
Re: So you've installed `fzf` – now what?
#234Re: So you've installed `fzf` – now what?
#235The meaning of find . '/' Was not immediately apparent to me. It will first search the current directory, then search from the root directory of the filesystem. This is useful (beyond just `find` which is implicitly `find .`) because it will turn up local results quickly and global results eventually.
find . /
Don't get why there's quoting here.Re: So you've installed `fzf` – now what?
#236Interesting, I'm of the first kind, who uninstalled it quickly. I use ctrl-r a lot, though I have no issue remembering exact portions of the commands, but that may just be me. I'll give it another try. In the same vein as ripgrep (rg), I recommand the author (and everybody else) to give fd-find (fd) a try as a replacement to find. It's much, much faster (multithreaded search), and has better defaults to use from the…
If you don't want to install a tool just for this:
fs() { find -iname '*'"$1"'*' ; }
I don't really have big directories where speed would be a benefit, so haven't tried `fd` yet. I do use `ripgrep` but mostly for its features (like default recursive search respecting .gitignore, `-r` option, etc) over speed benefits.Re: So you've installed `fzf` – now what?
#237Am I the only one that tried fzf as a replacement to the default Ctrl+R behavior, then switched back? I'm perfectly satisfied with the default Ctrl+R functionality, to the point that fzf seemed to add visual clutter without any value. I guess I was never let down by inverse search. Context: I'm using Linux and doing SWE and SRE work, and constantly live in the terminal.
# use up and down arrow to match search history based on typed starting text
"\e[A": history-search-backward
"\e[B": history-search-forward
# if you prefer to search anywhere in the command
"\e[A":history-substring-search-backward
"\e[B":history-substring-search-forwardRe: So you've installed `fzf` – now what?
#238Earlier quoted context omitted.
i love and daily-drive fish, but i don’t think fish does everything fzf does. did you stop reading the article at ctrl-r?
I like this: https://github.com/PatrickF1/fzf.fish It's one of the few packages that I think genuinely enhance fish versus merely adding a bunch of cruft.
alt+ctrl+f and ctrl+r are indispensable.
Re: So you've installed `fzf` – now what?
#239 alias kctx='kubectl config get-contexts -oname | fzf | xargs kubectl config use-context'
alias prv="gh pr list | fzf | awk -F ' ' '{print $1}' | xargx gh pr view -w"
Amazing stuff.Re: So you've installed `fzf` – now what?
#240Earlier quoted context omitted.
Fuzzy history is nice, but the real game changer for me was the ability to pretty much stop remembering paths in big projects. The default keybindings provide the Ctrl-T shortcut to insert a path/filename on the command line using fuzzy search and Alt-C to fuzzy-cd. No more tedious completion - just search + enter.
Same thing with Emacs with Projectile. I can't believe people still using a tree view of a deeply nested project and clicking though directories and finally finding a file. I am not willing to type more than a few characters for any file in the project. Fuzzy finding with quick narrowing FTW.