3 ms·
Find has a pretty poor API in my opinion. Replacing it with fd is a simply improvement similar to ripgrep over grep. Separately, I have a bunch of keybindings
by bradly 6y ago
Find has a pretty poor API in my opinion. Replacing it with fd is a simply improvement similar to ripgrep over grep.
Separately, I have a bunch of keybindings to load sets of files into fzf for easy access. Things like modified files, files changed in current branch, branches modified in the past six weeks. All of these have make working for a large code base much easier for me with little downside except have to piece them together on a new machine.
- mssundaram 6y ago> Separately, I have a bunch of keybindings to load sets of files into fzf for easy access. Do you have your dotfiles available to share? That sounds really useful
- bradly 6y agoI don't have dotfiles online, but many were inspired by this gist: https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f17236 https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f... For other things like files changed in current branch I've just kludged together aliases: branch_files='git log --decorate --pretty=oneline --abbrev-commit --name-only --no-merges --first-parent main..HEAD | fpp' (fpp extracts file paths from output) If you use zsh it can also helpful to setup suffix aliases so just the filename is bound to an application. For instance `alias -s {rb,erb,rake,css,js}=vim`
- apjana 6y agoThanks for sharing!
- apjana 6y agoI found switching to fd challenging. fd makes some of the options easy. But find and fd are not syntactically the same. I guess I didn't spend enough time with it.
- superasn 6y agoI just checked both fd and ripgrep and they both seem like wonderful tools. I've been using a very long and slow bash script for what ripgrep to make grep -R avoid my node_modules directory. Being realtively new to Linux both these commands will be super helpful to me. Are there any other command line tools you will recommend?