Live data from Hacker News

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

github.com

81–90 of 206 posts

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

#82
post #63
post #62

Earlier quoted context omitted.

As mentioned in another comment, vim doesn't provide exactly the same experience: navigation is more cumbersome because you need extra keystrokes for type-to-search and to cd a folder. It also requires some extra tinkering for vim to print out the cwd when you exit.

Clearly it's not going to be functionally identical, which is why I said it might interest people who are after something similar "without installing additional dependencies". That said, I do think your reply here is a little disingenuous because one extra key stroke is hardly "cumbersome". Especially when you advertise your tool as having VIM bindings and then criticise VIM for the same thing. I have no issues with…

> one extra keystroke is hardly cumbersome

To me, there really is a significant difference in friction when navigating in vim vs tere. Maybe it's because I need to use shift to type '/' on my keyboard layout. But I also have to press enter twice to cd after searching.

The point about opening the files within vim is valid, and I have been considering adding the option to call xdg-open on highlighted files, like many such tools do. I haven't decided yet if that's within the scope of tere.

> It's just a common problem so you'll probably find a lot of people have already solved this with other tools

I agree, and indeed there are a lot of existing alternatives as mentioned in the README. The main motivation for me was to make something that works just the way I want, and secondarily, to write something fun in Rust.

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

#83
post #37

Congrats for getting this out! > I also wanted an excuse to learn This is the best reason ever, and not just for you: seeing your GIF I thought "could I achieve that with fzf?". Turns out, yes I can: function fcd() { local dir; while true; do # exit with ^D dir="$(ls -a1p | grep '/$' | grep -v '^./$' | fzf --height 40% --reverse --no-multi --preview 'pwd' --preview-window=up,1,border-none --no-info)" if [[ -z "${dir}…

FYI: I think you meant "contagious" rather than "contaminating". The latter means to make something impure whereas the former means more to spread something. :)

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

#86
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.

`cargo tree` output: tere v1.0.0 ├── clap v3.0.10 │ ├── bitflags v1.3.2 │ ├── indexmap v1.8.0 │ │ └── hashbrown v0.11.2 │ │ [build-dependencies] │ │ └── autocfg v1.1.0 │ ├── os_str_bytes v6.0.0 │ │ └── memchr v2.4.1 │ ├── strsim v0.10.0 │ ├── terminal_size v0.1.17 │ │ └── libc v0.2.126 │ └── textwrap v0.14.2 │ ├── smawk v0.3.1 │ ├── terminal_size v0.1.17 (*) │ ├── unicode-linebreak v0.1.2 │ │ [build-dependencies] │ │…

hashbrown, smawk, corasick, parking_lot, itoa, ryu

Writing in Rust looks like casting spells in an Infocom game.

Gnusto rezrov!

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

#87
One thing I'd like is a cd command incantation that when given a file path, it just changes to the dir containing such file.

It is such a common need (for me at least) that I'm surprised the standard cd doesn't do it already.

I find myself using find or locate, then wanting to change to some file's directory, thus needing to manually delete the file's name before hitting enter. When you do that enough times you start to wish it worked automatically :-)

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

#88
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.

Just wait till the deps go away or change in some significant way.

Not in rustland.

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

#90
post #87

One thing I'd like is a cd command incantation that when given a file path, it just changes to the dir containing such file. It is such a common need (for me at least) that I'm surprised the standard cd doesn't do it already. I find myself using find or locate, then wanting to change to some file's directory, thus needing to manually delete the file's name before hitting enter. When you do that enough times you start…

     function  cdf {
        cd `dirname $1`
     }
From my .zsrhc. This only does the file use case, it doesn't work for directories. Probably easy enough to add.
Post reply on HN