Show HN: Nav – A terminal navigator for interactive `ls` workflows
75 points| dankco | 2 years ago |github.com
I built a tool for interactive navigation in the terminal that is intended to replace the all-too-familiar cycle of `ls` to view a directory, followed by `cd`, then `ls`, and repeat.
nav is a terminal filesystem explorer built for interactive `ls` workflows. The key features I wanted to enable are interactivity and search without feeling like I'm using anything other than `ls`. nav supports common `ls` options/flags, as well as tab completion, and might expand its support for less common options in the future. These options exist as both CLI flags and interactive toggles.
nav works as a standalone tool or in a bash/zsh pipe or subshell to e.g., change directories, copy a file name to the clipboard, etc. For example, I use the simple functions from the README in my .zshrc for interactive `cd` and copy-to-clipboard workflows.
nav was inspired by the discussion of the excellent `walk` [0] tool and was written from the ground up to support its `ls`-centric interactive feature set. I hope you might find it useful and I'd love to take any feedback or suggestions that might come to mind!
jraph|2 years ago
For this part specifically:
> the all-too-familiar cycle of `ls` to view a directory, followed by `cd`, then `ls`, and repeat
I use (oh-my-)zsh for this. Tab would autocomplete (with some basic support for "fuzzy search" - case insensitive, part for the file works). If there are several options it displays them and they can be selected. When completed, another tab press displays the folder content. For some commands, it tries to show only relevant files. For cd, it won't complete with the name of a (non-folder) file.
This is very effective. I feel like one of my hands is missing when I don't have this, for instance when I'm using bash.
dankco|2 years ago
linhns|2 years ago
dankco|2 years ago
metadat|2 years ago
Gratzi, amigo.
shashurup|2 years ago
Have you thought about implementing marks, so that you can select some files for further operations?
dankco|2 years ago
dankco|2 years ago
cstrahan|2 years ago
pxc|2 years ago
taffit|2 years ago
dankco|2 years ago
turboponyy|2 years ago
janderland|2 years ago
For my work patterns it’s too feature rich. I only use it for browsing directory structures. Everything else just gets in the way because I haven’t taken the time to learn the other features.
djbusby|2 years ago
https://midnight-commander.org/
dankco|2 years ago
I do intend to expand nav's feature set to come close to an `ls` replacement, at least for the most common workflows, whereas midnight-commander and other similar tools are perhaps closer to being (or are) file managers. I'm also hopeful that by using the completely awesome Charm [0] libraries that I can make for a pleasing/modern UI. Either way, I had a blast building nav and look forward to continuing on.
Thanks again for the comment!
[0] https://github.com/charmbracelet
renewiltord|2 years ago
unknown|2 years ago
[deleted]
pmarreck|2 years ago
unknown|2 years ago
[deleted]