mgunyho / tere

Terminal file explorer
European Union Public License 1.2
1.67k stars 36 forks source link

autodetect if it has been installed correct #83

Closed neoneye closed 1 year ago

neoneye commented 1 year ago

There are already some github issues about this. #34 #76

I installed tere on macOS with brew install tere. Then I run tere immediately and it starts, great. However when I Esc'ape tere, the current dir doesn't get updated, I spend some time on investigating what is wrong.

I had to update my .zshrc.

Please make tere do a health-check if it was installed correctly, and guide the user how to fix it.

mgunyho commented 1 year ago

Hi, thanks for the feedback.

To improve the setup experience, I would like to know: how did you find out about tere? Did you install it following the instructions in the README? If so, how do you think the instructions could be clarified so that people don't miss the step about the shell configuration? Or did you see tere in a blog post or similar, and directly brew installed it?

I'll try to see if it's possible to automatically detect if tere is correctly installed, but I'm afraid that it cannot work in general. I can't think of a way to find out if tere is run via an alias, in a way that works for all different shells, including CMD and Powershell. And it's not really clear how I would even define being "installed", as for example tere could be run within another program. How would tere know when to warn the user about the shell config?

neoneye commented 1 year ago

I learned about tere in my github feed. One of the people that I follow had starred tere.

I can't recall what I was thinking when seeing the readme. I guess I was frustrated by the big size of the install instructions, so I thought that must be if you are to compile it from scratch. What popped out was the brew install tere text, and I just went with that, without ever seeing the step 2.

Alternatively shorten the Setup instructions by removing the Configure your shell section, and instead have tere show this text on first launch.

Kludgy health check idea:

Your tere tool is awesome. I'm a fan.

mgunyho commented 1 year ago

That's a fair point that the setup instructions in the README are a bit verbose, I'll try to work on it a bit.

The --shell option could work, although it would then require existing users to update their configs (maybe an argument in favor of https://github.com/mgunyho/tere/issues/46).

Another option I thought of was to look for a file in .cache/tere/ which would tell us if we're running for the first time or not, although this would be slightly more magical.

mgunyho commented 1 year ago

I have now improved this as of version eef493b8e798896bb16064897884390109b305d9:

Hopefully with these changes, this kind of confusion happens less in the future.

neoneye commented 1 year ago

Excellent with the check for history.json. I like that.

Thank you for creating this awesome tool.