News for hackers. Stuff that matters.
Re:Show HN: Nnn – unorthodox terminal file manager by bradly on Tuesday November 17, 2020 @01:47PM (#25127849)
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.

Re:Show HN: Nnn – unorthodox terminal file manager by apjana on Tuesday November 17, 2020 @02:58PM (#25128858)
I 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.
Re:Show HN: Nnn – unorthodox terminal file manager by bradly on Tuesday November 17, 2020 @03:31PM (#25129386)
No, you are probably right. My main usage of find is `find ./ -name "blah"` which with fd is simply `fd blah`. If you are doing more complex finds then it may very well not be a good replacement for all find usage.
Re:Show HN: Nnn – unorthodox terminal file manager by apjana on Thursday November 19, 2020 @08:17AM (#25149146)
nnn supports all of them BTW - find, grep, fd, ripgrep...
Re:Show HN: Nnn – unorthodox terminal file manager by superasn on Tuesday November 17, 2020 @08:41PM (#25132216)
I 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?

Re:Show HN: Nnn – unorthodox terminal file manager by mssundaram on Tuesday November 17, 2020 @02:55PM (#25128822)
> 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

Re:Show HN: Nnn – unorthodox terminal file manager by bradly on Tuesday November 17, 2020 @03:29PM (#25129364)
I don't have dotfiles online, but many were inspired by this gist: 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`

Re:Show HN: Nnn – unorthodox terminal file manager by apjana on Wednesday November 18, 2020 @01:13PM (#25140195)
Thanks for sharing!