4 ms·
also, have you seen this fzf "trick"? I am sorry for spamming this comment, but I wanted to share it with all the fzf users because I found it so game-changing
by bloopernova 5y ago
also, have you seen this fzf "trick"?
I am sorry for spamming this comment, but I wanted to share it with all the fzf users because I found it so game-changing:
I use "ESC-c" a lot. It calls fzf and fd, you type a part of your directory name, hit enter, and it cd's to that directory.
export FZF_ALT_C_COMMAND='fd --type directory'
That's in my .zshenv.
It's incredibly useful if you have multi-layered project directories. Like ~/Projects/Terraform/Cool_Project - you'd hit esc-c, type cool, hit enter and you're in the place you wanted to be.
- agbell 5y agoVery cool! I use zoxide as a alias for cd to do this. But it only really works if you have cded using the full path in the past. But usually I have.
- lobocinza 5y agoI use a similar trick but with aliases. If I want to cd to let's say "~/work/john/some-project" I just type 'fcd' on the console and then "w j s" and "ENTER". Most of the times it work as expected and is really fast. This is a mode provided by a helper that I wrote for fzf to make it easier to use and more useful. In essence it's just a shell script with a bunch of fzf tricks pre-configured. https://github.com/danisztls/fzfx/ https://github.com/danisztls/fzfx/