If I want something more rich or discoverable, I'll just move to a GUI, which handles this much better.
If I want something more rich or discoverable, I'll just move to a GUI, which handles this much better.
Also, find/fzf etc. are useful as long as you are not on a slow disk and a mid-range Android device/the Pi. If you are saying you are OK with scanning the whole filesystem every time you are looking for something that can be anywhere under /, I simply don't prefer that.
You can specify a target directory from which to start the search.
But you know what, let me share a smarter workflow:
find . -iname "*.mp3" -print0 | nnn -p -
Now you list all yours mp3 files in nnn, examine/play them and finally get to cherry-pick some and print them to stdout when you quit nnn.BTW, you can also run the find within nnn and list in nnn.
Better to have "chpwd() { ls }" in your .zshrc as this executes ls after cd'ing to save up on your infinite amount of ls typing.
If you only work inside messy folders with hundreds of files all the time, maybe it's time to tidy up.
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.
Do you have your dotfiles available to share? That sounds really useful
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`
Being realtively new to Linux both these commands will be super helpful to me. Are there any other command line tools you will recommend?
With ranger[0], I can even use it as an alternative to cd, which is often the most convenient (I usually want a terminal in the last directory I browsed to, not the place where I opened the file manager[1]).
I hope to find a way to use nnn similarly, but it (like ranger) doesn't seem to support this out of the box.
[0]: https://github.com/ranger/ranger
[1]: https://unix.stackexchange.com/questions/342064/ranger-cd-in...
cd on quit works in nnn as well... and many other file managers.
https://github.com/jarun/nnn/wiki/Basic-use-cases#configure-...
No utility can support cd-on-quit out of the box because a spawned process can't send the $PWD to the parent directly when it quits. It needs tweaks in your shell's rc file. nnn also needs the same instrumentation.
Looks like emacs uses at least double the memory.
I don't personally use them, but I live in emacs for many hours a day so I do use its integrated directory-manager (dired) to perform simple operations.
Add a drop-down temrminal file manager to the mix, so you never lose your context. ;)
A gui doesn't help, because usually I'm on a remote server somewhere (using SSH).
List of features: https://github.com/jarun/nnn#features
A terminal file manager has a GUI that works everywhere, including over SSH sessions (OK, technically could use X forwarding, but it's slow).
nnn takes care of these already. I don't think you would see a difference once you get used to.
Can someone who uses these tools explain ?
My question isn't snark. It's more like "what is the usecase and what advantages does it have over standard terminal workflows?"
FWIW: My main file manipulations I need to do are within vim when working on a project. I typically use nerdtree for this, but having a project that's consistent in my environment would be good.
I do other manipulations using standard tools like ls/rm/etc. what advantages does this have over those ?