This may be my favorite CLI tool ever

Sdílet
Vložit
  • čas přidán 17. 07. 2024
  • 50% Off Typecraft! typecraft.dev
    X: x.com/typecraft_dev
    Discord: / discord
    FZF is my favorite tool for linux and unix systems. It has amazing features, its simple to use, and its fun! it works amazing and I think this is an essential tool for you to learn. This is a must have in your toolbox. You can fuzzily find anything on your machine, and you can also pipe output from other programs to FZF. it truly is amazing.
  • Věda a technologie

Komentáře • 184

  • @reaperfs2371
    @reaperfs2371 Před 12 dny +121

    Thanks, nerd

    • @subashpraveen
      @subashpraveen Před 12 dny +3

      well... in this side of internet its actually a compliment lol 😂

    • @adnope
      @adnope Před 8 dny

      this is getting funnier and funnier lol

  • @catharsis7629
    @catharsis7629 Před 12 dny +59

    You are one of the few devs who actually understands his tooling and is willing to take the time and effort required to properly learn them to make your workflow faster. More devs need to follow this mentality.

  • @thecallumarnold
    @thecallumarnold Před 12 dny +22

    If you use the `--bind "enter:become(nvim {})"` flag then it will open the selected file(s) in nvim for you (without needing to prepend your command with `nivm ...`), which means that you can cancel out of the fzf finder without neovim from being entered. With the command listed, escaping fzf will still open nvim, which might not be what you want if you're trying to escape the search.
    For completeness, this is my alias.
    alias nf='fzf -m --preview="bat --color=always {}" --bind "enter:become(nvim {})"'

    • @domjan3859
      @domjan3859 Před 9 dny

      I was having issues with your listed alias, it showed me STDIN where the bat preview should have been, probably a "me problem"...
      Anyways, I found a small fix for anyone encountering the same issue:
      alias nf='fzf -m --preview="bat --color=always {}" --bind "enter:become(nvim {})"'
      Difference is that fzf passes the file path to bat with the little '{}' after "bat --color=always ..."

    • @thecallumarnold
      @thecallumarnold Před 9 dny +1

      ​@@domjan3859 Thanks for pointing that out - that was an issue on my end. I've edited my comment to make it clear it needs `{}` in both parts!

    • @FredMny
      @FredMny Před 8 dny

      Nice!! Thanks for this

    • @scottfollmer
      @scottfollmer Před 7 dny

      For some reason with this alias, selecting multiple files didn’t work for me and only the last file selected was actually passed to nvim

  • @TheBecke1983
    @TheBecke1983 Před 12 dny +12

    Sweet, now i got my day planned. Don't know how I missed this program

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +5

      Some of the stuff fzf gives (like kill -9 **) was unknown to me as well, even though I've been using fzf for a WHILE

    • @TheBecke1983
      @TheBecke1983 Před 12 dny

      @@typecraft_dev Kind of feels like that when using Linux tbh, learning new things constantly :)

  • @adamkarafyllidis9264
    @adamkarafyllidis9264 Před 12 dny +21

    Also nice:
    1. nvim Ctrl + t ( opens fzf. Of course works for any command ).
    2. Ctrl + r opens shell command history

    • @Nitiiii11
      @Nitiiii11 Před 11 dny

      "Ctrl + r opens shell command history"
      Honestly I have no idea how anyone can use reverse-i-search after discovering this. 100x better on every level.

    • @debajyatidey9468
      @debajyatidey9468 Před 11 dny +1

      Exactly always works like a charm

    • @keaneplayingmbae2852
      @keaneplayingmbae2852 Před 11 dny +1

      Never knew this w comment

    • @frydac
      @frydac Před 2 dny

      ctrl-r with fzf is the main reason I install fzf on every pc I touch (if I'm allowed to of course)

  • @errorcode778
    @errorcode778 Před 11 dny +1

    Amazing tool! I should start using it

  • @Kunal-k-u-m-a-r
    @Kunal-k-u-m-a-r Před 12 dny +5

    i used it before but learned new things today i hadn't figured out earlier

  • @gand0rfTRZ
    @gand0rfTRZ Před 11 dny

    Why do you keep giving us great weekend projects?? Thanks for showing us this. Now I can't wait to get home and install it.

  • @claudioonoue2000
    @claudioonoue2000 Před 12 dny +3

    0:42 The pacman frontend name almos killed me
    🤣

  • @anciao_dev
    @anciao_dev Před 12 dny +2

    Now, this is a really good trick!

  • @bpbrainiak
    @bpbrainiak Před 12 dny +6

    thanks nerd, your video + coffee = great day

  • @JonBrookes
    @JonBrookes Před 12 dny +2

    fzf is very nice as is your video and guide. Thanks. I picked up some very useful things I hadn't used. I also use cntrl r in bash and search history that way which is kind of similar but where fsf is not present

    • @typecraft_dev
      @typecraft_dev  Před 12 dny

      Yes FZF with history search is amazing I forgot to add it in this video!

  • @phortheman
    @phortheman Před 12 dny +2

    I use fzf every day for work. It’s probably the best CLI tool out there!

  • @_Holy_Lance_
    @_Holy_Lance_ Před 12 dny +2

    Thank you, Chris.

  • @benjaminschultz6501
    @benjaminschultz6501 Před 3 dny +1

    Take a shot every time he says, “Fuzzily findable.”

  • @QWEEKEN73
    @QWEEKEN73 Před 12 dny +1

    That kill command looks insanely useful. Giving fzf a try!

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +1

      Regarding kill, just make sure you take a look at this article so you use kill safely! learn.typecraft.dev/tutorial/kill-choices/

  • @elnurbda
    @elnurbda Před 12 dny +1

    i did not know i need it. thanks O_O

  • @japadkman
    @japadkman Před 12 dny +6

    with fzf on my shell i can press ctrl+r then it will fuzzy find any commands on my bash history, i use it quite often

    • @typecraft_dev
      @typecraft_dev  Před 12 dny

      yup! thats one of the best. I've used it so often I actually forgot about it for this video. lol

  • @armaandhanji2112
    @armaandhanji2112 Před 12 dny +2

    Amazing content. Subscribed!! By the way can you tell me where you got your desktop wallpaper from?

    • @typecraft_dev
      @typecraft_dev  Před 12 dny

      github.com/typecraft-dev/dotfiles/tree/master/backgrounds

  • @JakeLinux
    @JakeLinux Před 11 dny +2

    Fzf is one of my favorite tools, I have a few videos covering it on my channel. I made videos showing how I use it to make my menus, my app launcher, I even made a terminal file manager out of it. Great tool.

  • @paulhammond8583
    @paulhammond8583 Před 12 dny +1

    I didn’t know about the ** stuff. Cheers for that!

  • @muslimgamerrr9479
    @muslimgamerrr9479 Před 11 dny +1

    love the arch btw

  • @apptimegr
    @apptimegr Před 11 dny +1

    Your videos are awesome! 👌

  • @maybehawk5205
    @maybehawk5205 Před 12 dny +4

    Thanks, Nerd

  • @sledgex9
    @sledgex9 Před 12 dny +6

    For those of us stuck with bash (eg from git for windows) and don't have the zsh history autocomplete, fzf integrates with bash history. So hit CTRL+R and you'll be able to fuzzily find past commands you run. Very handy for me.

  • @QuOUseTERSEa
    @QuOUseTERSEa Před 11 dny +2

    I think people should only use fzf when you need multi selections or “fuzzy” search. When you know what you’re searching, it doesn’t make sense to use fzf, since it’s much faster to use fd, grep, glob, etc. It slow down your process and just add an interface that make u feel fast 😂

  • @ericlindell3777
    @ericlindell3777 Před 12 dny +1

    Great vid!

  • @bhuvan1036
    @bhuvan1036 Před 12 dny +2

    Wait, how did you know i was searching for this...

  • @Kunal-k-u-m-a-r
    @Kunal-k-u-m-a-r Před 12 dny +2

    can you make a video on best cli development lang or framworks

  • @tvntvn-b
    @tvntvn-b Před 11 dny +2

    unalias does not remove the alias from your .zshrc, it only removes it from the environment of the current session. When you open a new terminal or source your zshrc, the alias will be added again.

    • @typecraft_dev
      @typecraft_dev  Před 11 dny +1

      yes that is correct. was just showing off the feature for FZF

  • @channinghsu46
    @channinghsu46 Před 12 dny +3

    Really enjoy every video of yours, thanks nerd!!

  • @samarth-kun
    @samarth-kun Před 9 dny

    Hello again 👋🏻 Where can I get that background wallpaper it's so calming 😸

  • @FranLegon
    @FranLegon Před 12 dny +1

    Pretty cool

  • @baky5372
    @baky5372 Před 12 dny +2

    I've seen people use this but never knew what it was called. Thanks so much for the great video!

  • @TheBearmoth
    @TheBearmoth Před 11 dny +1

    Using it with a preview is new to me. Thanks for the awesome tip!

    • @typecraft_dev
      @typecraft_dev  Před 10 dny +1

      yeah, big part of the reason I made the video. that was new to me as well!

  • @dDesirie
    @dDesirie Před 11 dny

    So is it like Raycast or Alfred but for CLI? This is pretty cool!

  • @allenkim4776
    @allenkim4776 Před 9 dny

    I was very appriciated for your neovim video. I want to use ftp-sync in neovim like vscode(sftp or ftp-simple), but I couldn't find out how to set for it. Please help us!

  • @timonjur
    @timonjur Před 12 dny +1

    I actually have to change my terminal to Alacritty at some point, since Warp does not support fzf at the moment

    • @typecraft_dev
      @typecraft_dev  Před 12 dny

      ah yes. warp kinda implements its own fuzzy find stuff.

  • @kuijaye
    @kuijaye Před 12 dny +1

    You can use nl instead cat to have the preview numbered

  • @ludwig8841
    @ludwig8841 Před 12 dny +2

    Quick tip for those who use fish shell
    ** will not work
    instead, just CTRL+T to get the same functionality
    you can find more information here github.com/junegunn/fzf?tab=readme-ov-file#fish-shell

  • @djbessel
    @djbessel Před 12 dny +1

    How do you feel about oh-my-zsh? Adding fzf means I just add it to my plugins list, instead of a list of actions cluttering my .zshrc for fzf, nvm, whatever.

  • @TheBendixSA
    @TheBendixSA Před 6 dny

    I'm still learning so feel free to flame but isn't yay used for the arch user repo? what is meant by calling it a front end for pacman then which is used for the Arch package repo? aren't they kind different tools to get packages from different places? (I do now yay is installed from pacman)

  • @Ramilkos
    @Ramilkos Před 12 dny +1

    Instantly in love with how it works with shell history.

  • @kmuju1158
    @kmuju1158 Před 12 dny +1

    Are you using i3 in this video? If so, how did you get the bar at the top of the terminal?

    • @typecraft_dev
      @typecraft_dev  Před 12 dny

      Nah used gnome just for presentation

    • @kmuju1158
      @kmuju1158 Před 12 dny

      @@typecraft_dev Yeh that makes sense. Great video, need to look more into integrating fzf into my workflow. Have you looked at the tmux-sessionizer script by primeagen? Its a great script that uses fzf to open a folder in tmux. Had to change part of it to work for me but dont remember exactly what was wrong.

  • @tiagomello
    @tiagomello Před 11 dny +1

    Which keyboard are you using?

  • @LEBR27
    @LEBR27 Před 12 dny +1

    Thanks nerd!! One question: What if i dont wanna write the ** to completion, i just wanna press tab as always? how i can do this?

    • @m0r4ag
      @m0r4ag Před 12 dny +1

      Solo exporta esta variable de entorno:
      export FZF_COMPLETION_TRIGGER=''
      Lo probé antes de responder, no me pareció muy cómodo de usar

    • @LEBR27
      @LEBR27 Před 12 dny

      @@m0r4ag gracias voy a probar, quiero emular de manera "nativa" lo que hace fzf-tab-git qué se puede instalar desde aur, donde igual solo basta poner por ejemplo "cd " en vez de cd **

  • @danielwood4786
    @danielwood4786 Před 12 dny +4

    Come on nerd. You missed the fzf history search. Ctrl+r in bash, probably something similar in Zsh

    • @typecraft_dev
      @typecraft_dev  Před 12 dny

      ah yeah, I've used that for so long I forgot to include it in the video!

  • @thoric01
    @thoric01 Před 12 dny +1

    This tool is almost as awesome as you

  • @Lorne_at_work
    @Lorne_at_work Před 12 dny +2

    fzf is awesome, but the latest stable version for Ubuntu is missing some of those cool features. I hope that changes soon. Or I guess I could always swap to Arch :D

  • @bzboii
    @bzboii Před 11 dny

    what terminal emulator do you use

  • @ManpreetSingh-ox6hh
    @ManpreetSingh-ox6hh Před 11 dny +1

    which theme you are using??

  • @obeyoutube
    @obeyoutube Před 12 dny +1

    bomb diggity ❤

  • @APerson-jf2md
    @APerson-jf2md Před 2 dny

    4:39 - that means you didn't checkout broot yet :)

  • @BrentMalice
    @BrentMalice Před 12 dny +1

    lmao i went to ask for this yesterday but i got distracted. now its here.
    OPRAH WAS RIGHT IM MANIFESTING

  • @itzaryaanyt2003
    @itzaryaanyt2003 Před 12 dny

    Someone tell me how to ignore specific files and folder while searching through fzf and how to add some specific files and folder to show in fzf , thanks

  • @zukxxxx0
    @zukxxxx0 Před 10 dny +1

    Can you upload setting up nix package manager, home manager and nix profile with flakes guide🙌🙌🙌🙌

  • @ispyu1514
    @ispyu1514 Před 9 dny

    Next one on yazi?? 👀

  • @chrislee9344
    @chrislee9344 Před 4 dny

    who needs all of that when you have `find`.

  • @chri-k
    @chri-k Před 11 dny

    alao make sure to use fd instead of find (it's like 6 times faster). fzf will automatically prefer fd if you have it installed

  • @kevin.michaels
    @kevin.michaels Před 12 dny +1

    Is it just me or did this video feel like it was going n 1.25x speed?
    Other than that, great vid :)

  • @falwickster
    @falwickster Před 12 dny +2

    Preety cool

  • @XxZeldaxXXxLinkxX
    @XxZeldaxXXxLinkxX Před 12 dny +1

    I swear I've seen a fzf video from this channel before?

    • @typecraft_dev
      @typecraft_dev  Před 12 dny

      nope! this is the first one

    • @bojanstrkovski21
      @bojanstrkovski21 Před 12 dny

      it's could be part of a video i think it was one in the neovim series but awesome new comands to find things i've lost trough my pc yhanks nerd 😄

  • @muhammedmaher6704
    @muhammedmaher6704 Před 10 dny +1

    You're the most efficient dev and CZcams content creator I know! Keep it up man, you're awesome. 💪

  • @juanmacias5922
    @juanmacias5922 Před 12 dny

    Laptop go Brrr

  • @Em0L0rd
    @Em0L0rd Před 12 dny

    Only if I had a penny for every time typecraft talked about fzf...

  • @sumirandahal76
    @sumirandahal76 Před 11 dny +1

    Why did u left arch ?

    • @typecraft_dev
      @typecraft_dev  Před 11 dny +1

      This video is recorded on arch

    • @sumirandahal76
      @sumirandahal76 Před 11 dny

      @@typecraft_dev in next video don't forgot to mention I use Arch , btw

  • @ddthegr8
    @ddthegr8 Před 12 dny +2

    linux for newbs 4 when

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +1

      what would you like to see in linux for newbs 4? I want to know!

    • @emiliocanton1494
      @emiliocanton1494 Před 12 dny

      Your vim and tmux configs for productivity

    • @ddthegr8
      @ddthegr8 Před 12 dny

      @@typecraft_dev I'd love to see a full arch + i3 + neovim setup from scratch, maybe live

  • @mrlectus
    @mrlectus Před 7 dny

    kill multiple program?

  • @highlander576
    @highlander576 Před 12 dny +2

    0:41 🏳‍🌈The gay package manager

  • @ispyu1514
    @ispyu1514 Před 12 dny +1

    Day 4 of asking to make a video on how do you record and stream stuff on arch linux!

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +1

      the answer: I don't!

    • @ispyu1514
      @ispyu1514 Před 12 dny +1

      @@typecraft_dev then how?

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +1

      @@ispyu1514 technically I can stream from arch pretty much out of box with OBS. But not all things are supported (like nvidia). So now I stream through a capture card on a PC

    • @ispyu1514
      @ispyu1514 Před 12 dny

      @@typecraft_dev ohh but does ur obs on arch works with window capture or just screen capture?

  • @imanav07
    @imanav07 Před 12 dny

    someone can just use locate?

  • @Krishtal3
    @Krishtal3 Před 12 dny +1

    OMG

  • @paultapping9510
    @paultapping9510 Před 12 dny +2

    kill -9 ** is an incredible tip

  • @berend109
    @berend109 Před 12 dny +1

    For me I probably prefer ranger.

    • @adriansrfr
      @adriansrfr Před 12 dny

      Yazi is better

    • @berend109
      @berend109 Před 11 dny +1

      @@adriansrfr I don’t know that tool, wil look at it tonight.

  • @qandak
    @qandak Před 10 dny +2

    Be careful using "cat" with huge files, it's not a pager!

  • @sarkedev
    @sarkedev Před 7 dny +4

    0:34 it's not D-bien, it's Deb-Ian. It was created by Ian Murdock and named after his gf Debra (Deb for short, later ex-wife) and himself.

    • @typecraft_dev
      @typecraft_dev  Před 7 dny +1

      I always mess it up! Great explanation I didn’t know that

  • @shizeeque
    @shizeeque Před 12 dny +2

    here's like #172 for pronouncing "Zee/Zed Shell correctly". It's not "zeesh". 👌

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +1

      I think I say it both ways, lol. I'm sure I mis-pronounced "debian" in this video too haha. can't help it!

  • @leanghok120
    @leanghok120 Před 12 dny +1

    Those soydevs are missing out

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +2

      I have soymilk in my coffee right now...... shit

  • @Macj707
    @Macj707 Před 9 dny

    couldnt get my ** to work dunno what that is about

  • @bender2033
    @bender2033 Před 12 dny

    tac is cat backwards.

  • @sp10sn
    @sp10sn Před 12 dny +11

    I don't lose stuff often enough for fuzzy find to be useful.

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +3

      fair enough

    • @zokalyx
      @zokalyx Před 12 dny +4

      chad dev

    • @ankushroy1729
      @ankushroy1729 Před 12 dny

      I use it to find old ffmpeg and one liner commands that might need some time and overhead.

    • @mathijswy
      @mathijswy Před 12 dny +5

      Even if you don't lose the files, isn't it a very fast way of navigating the file tree regardless?

    • @glidersuzuki5572
      @glidersuzuki5572 Před 12 dny +1

      It's not just to find lost stuff. It's to find stuff faster. When you multiple files in different locations or deeply nested directories, fzf makes it way easy to find them

  • @agh0x01
    @agh0x01 Před 12 dny +3

    @6:55, why would you go straight to a `kill -9` - don't teach people bad habits! Use a normal kill (SIGTERM) first and give the process a chance to exit gracefully before reaching for the nuclear option.

    • @typecraft_dev
      @typecraft_dev  Před 12 dny +1

      Haha I guess I have that bad habit too. Oops!

    • @typecraft_dev
      @typecraft_dev  Před 10 dny +1

      For anyone reading this thread and want to know more, we cover this here learn.typecraft.dev/tutorial/kill-choices/

    • @agh0x01
      @agh0x01 Před 9 dny

      @@typecraft_dev thanks, nerd!

  • @kirillfedtsov
    @kirillfedtsov Před 11 dny +1

    Who is learning Unix today?

  • @TheRich107
    @TheRich107 Před 12 dny +1

    12th

  • @kinggrey2511
    @kinggrey2511 Před 12 dny

    7th

  • @RazoBeckett.
    @RazoBeckett. Před 12 dny +1

    119th

  • @kamalelbalaidi4914
    @kamalelbalaidi4914 Před 12 dny

    fzf amazing but I thing fzy better than it

  • @syrus3k
    @syrus3k Před 6 dny

    fzf is useless.. in the video it's nice and quick, but I have ~ 100 github projects on my m1 mac, it takes over a minute to search for a simple term (after it's indexed everything). Sure I have 54 million files in the index but so what.. it's not that many?

  • @bparker06
    @bparker06 Před 9 dny

    "by default it will search for all the files on your machine" no I don't think it does... at least I've never seen or heard of it doing that.

  • @ZombieJig
    @ZombieJig Před 12 dny +1

    Deb-Ian not Dee-Bian

  • @equu497
    @equu497 Před 10 dny

    Fzf is great but nothing beats zoxide

  • @getoutoftheway419
    @getoutoftheway419 Před 12 dny +1

    every video i see of urs that one mf calls him nerd. i am getting irritated on his behalf