Live data from Hacker News

Show HN: tere – A Faster Alternative to cd+ls

github.com

21–30 of 206 posts

Re: Show HN: tere – A Faster Alternative to cd+ls

#21
post #8

I'm going to be a dick here, because someone will say it anyways, but how is this different from VIM's directory browser? Essentially the same UI. I do think your program does add some features not found in VIM.

How do you get vim to output the path to the directory you want?

Re: Show HN: tere – A Faster Alternative to cd+ls

#23

I'm blown away at the quality of the readme :-) In the demo, how did you get the key press indicator to show? I haven't seen that before, but it's a wonderful addition. And may I ask what you used to record it?

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

Re: Show HN: tere – A Faster Alternative to cd+ls

#24

> "Tere" means "hello" in Estonian. It also feels nice to type. On qwerty I think that's the case :)

It feels bad to type on qwerty. Alternating hands feels nicer to type. That's part of why ls is so hard to remove from peoples' muscle memory.

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.

Re: Show HN: tere – A Faster Alternative to cd+ls

#25
post #6

curl https://raw.githubusercontent.com/mgunyho/tere/master/Cargo.lock | grep source | wc -l 51 How come that such a simple tool has more than half a century of dependencies? This is terrifying.

Some Rust dependency bloat is pretty common, because a lot of idiomatic approaches are hidden behind dependencies. I don't think it's particularly crazy in this situation. The actual dependencies directly used are relatively lean: crossterm = "0.24.0" dirs = "4.0.0" regex = "1.5.4" serde_json = "1.0" serde = { version = "1.0", features = ["rc"] } textwrap = "0.14" unicode-segmentation = "1.7" I guess one could write…

You missed clap for the CLI because it was written in table form:

  [dependencies.clap]
  version = "3"
  default-features = false
  features = ["wrap_help", "suggestions", "std"]

Re: Show HN: tere – A Faster Alternative to cd+ls

#26
post #22

I hit ~ expecting to go to my home directory, which was a bit odd Once I select a directory I want to dump myself back out into a command line in that directory, I couldn't see the key for that? Or am I misunderstanding the purpose?

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.)

Re: Show HN: tere – A Faster Alternative to cd+ls

#27
post #12

Lol, ~30 years ago a created such a tool for DOS in Turbo Pascal for my own usage. Later i "upgrade" it to a Star Trek LCARS Design.... i have to look if i still had the sources. History repeats.

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! :)

Re: Show HN: tere – A Faster Alternative to cd+ls

#29
I strongly dislike the idea of automatically jumping into a folder when there’s only one match: it feels like a feature optimised for very slow typers that actively penalises fast typers, because it makes things generally unpredictable: will one character be enough to navigate, or two, or three? It depends on the siblings, and if you type more characters than are required, you will be penalised by ending up somewhere else as the remaining letters are fed to the next level down that you haven’t even seen yet. My general habit in navigating is to type three characters and press Tab, because that’s almost always sufficient, and is plenty fast. I have a very few places where I’ve learned to do other things. Under my habit, I could end up as much as two levels down from where I wanted to be.
Post reply on HN