Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have ctrl-r and alt-c assigned to macro keys on my keyboard, they're so danged useful.

Something else you can try in your `~/.gitconfig`

    [alias]
      fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 git add"

    git fza will quickly let you add files if you've changed a lot.
I alias `git fza` to `ga` and it gets used a lot

Oh, and another useful shortcut is this:

    export FZF_CTRL_T_COMMAND="mdfind -onlyin . -name ."
Obviously only useful for MacOS, but fzf plus spotlight is pretty useful. You can use it to find that lost file that you only remember part of the name!


I'm not super familiar with spotlight/mdfind. What are the benefits it offers over using the default `find` command with fzf?


`find` has to traverse the filesystem, which is pretty slow. `mdfind` looks up in an indexed database, which is very fast.


Good to know! Thanks




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: