HNHacker News
TopNewBestAskShowJobs

mgunyho

429 karma · joined December 12, 2021

submissionscomments
mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
Tab completion with these settings takes some extra keystrokes: if there's only one match, you have to press tab twice to see what's in the subfolder. If you have several matches, you have to press tab, then enter to select the one you want, and then tab again to show the subfolder contents. And going up (especially several) folders is also quite a bit of typing. It might sound like splitting hairs to shave off less than five keystrokes, but it really does make a difference in how smooth the browsing feels.
mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
Yeah, I'll admit that the basic idea is not novel (I have a list of similar programs in the README). But I bet your tool doesn't work exactly the way I like! :)
mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
To end up in the directory where you are, you just have to exit using esc or alt-q, assuming you have set up your shell config.

I'll add ~ as a shortcut for the home directory, thanks for the good idea! (It conflicts with type-to-search for folders starting with '~', but I think that's much less common than cding to home.)

mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
Note that setting up tere requires defining an alias in your shell config anyway, so you can choose any name you want with basically zero extra effort! Except for coming up with an abbreviation you remember, of course. But I agree, it is faster to type with alternating hands.
mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
Funny, to me showing the keystrokes felt like a cliche in "modern"/flashy CLI app readmes :) I guess it's more often used in youtube videos.

I used screenkey to display the keystrokes and Peek to record the gif. I actually wrote some instructions for myself so I remember how I did it if I want to update the gif: https://github.com/mgunyho/tere/blob/master/demo/README.md

mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
I tried to avoid bloat as much as possible, and I would argue that the non-transitive deps are pretty essential. I'l look into tweaking some features as suggested in sibling to trim it further down.

But you're right that it could always be simpler, in fact I wrote tere originally in C with curses as the only dependency, and it compiles >10x faster. But there I had to manually write some (pretty certainly buggy) unicode handling, and I think adding extra features (proper arg parsing, json for history file etc) would be way more painful.

mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
It's true that vim probably contains all of the functionality of tere, but IME browsing with vim is still a bit more cumbersome (and I'm not sure if you can configure it to print the cwd on exit, though probably you can). The extra '/' keystroke in each subdirectory for type to search, and the auto-cd really does make tere feel smoother.
mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
True, it's not a very smooth experience on non-qwerty keyboards, and the keyboard shortcuts can't be customized yet. But it's high on the todo list!
mgunyho··on Show HN: tere – A Faster Alternative to cd+ls
That's mentioned in the readme! :) I'm pretty happy with the name choice, it's short, doesn't seem to clash with other CLI tools, it can be interpreted as "terminal explorer", and has a kind of cute meaning as you say.
← PreviousPage 2 of 2