Skip to content

Add an installation script #231

Open
sorin-ionescu opened this Issue Aug 6, 2012 · 26 comments
@sorin-ionescu
Owner

A one line, curl based installation may increase adoption.

@tombh
tombh commented Feb 18, 2013

Where is this idea at?

I just tried installing Prezto using the existing installation instructions;

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

But it didn't work because I already had ~/.zshrc installed, so of course zprezto/init.sh was never being run. This has taken me a good hour or so to figure out :(

My suggestion would be to have an installation script that prompted the user if .zshrc, or any other rc file already existed.

BTW, I love Prezto and it's way better than OMZ :D

@sorin-ionescu
Owner

If you write the script, I'll have a look.

@tombh
tombh commented Feb 18, 2013

At the very least it would be good to just change the README to describe how .zshrc needs to source init.sh

But an even better solution would be something along the lines of this pull request.

:)

@tombh
tombh commented Mar 3, 2013

I am the same person that suggested this pull request to provide an install script. The main reason I wrote it was to address the issue I mentioned a couple of comments above here. Namely that the installation instructions in the current README fail when there is an existing .zshrc

If you don't think an install.sh would be a suitable inclusion for the repo I would suggest that a small note be added to the README to remind the user to check that .zshrc has been succesfully linked or copied from prezto, otherwise the all-important zprezto/init.sh will never load.

@sorin-ionescu sorin-ionescu referenced this issue in loranger/prezto Jan 14, 2014
@loranger loranger [Add] Installer ec0b931
@bensaufley

But it didn't work because I already had ~/.zshrc installed, so of course zprezto/init.sh was never being run. This has taken me a good hour or so to figure out :(

Just wanted to put a +1 here. Same thing happened to me, after freshly installing zsh through homebrew – I'm assuming if it happened to me without having run any customization or anything previously, it's likely to be happening regularly. Even a note, or something, that covered this contingency: "if these files exist, you may need to copy the code in yourself" or something

@florrain
florrain commented Nov 2, 2014

+1 a one line install command would be awesome !

@al-the-x

This happened to more than a couple of my students at @theironyard who followed the install instructions. The first time zsh is run on Mac OS X, it very helpfully attempts to lead you through an initial configuration, which has the side-effect of creating a .zshrc file. Adding a --force flag to the ln command in the Prezto install docs will clobber that initially empty .zshrc file, but that might not be the best approach for folks switching to Prezto from OMZ or hand-crafted configs. Better to look for existing files and move or offer to move them?

Somewhat unrelated, the install and usage instructions recommend editing .zpreztorc to add modules and set prompt theme, etc, but if Prezto is installed as a clone of this repo and the files in runcoms are symlinked into ~, I can't very well commit my changes into my normal dotfiles repo, as one might expect. Happy to open a separate discussion on that point, of course, and submit PRs. The outcome of the two discussions seem intertwined, however, as the install script / instructions should reflect best practices for usage, maintenance, and upgrades.

@sorin-ionescu
Owner
@ebello
ebello commented Jan 7, 2015

+1 for this. I also had to use -f for the ln command in order for Prezto to work.

@thallam
thallam commented Feb 13, 2015

+1

@devinrhode2

It was strongly disheartened after uninstalling OMZ at a whim and installing Prezto, only to see an extremely raw prompt:

devin%

FORTUNATELY I found this answer by googling "uninstally prezto" which led me to this issue. brew install prezto and brew uninstall prezto would be a stellar improvement - of course prezto would need to be accessible via linux package managers too

@sorin-ionescu
Owner

Prezto is not in Homebrew. Prezto is meant to be used via Git, not package managers.

@tombh
tombh commented Feb 19, 2015

Just to make it clear, the main issue people are having is not that lack of an installation script (whether that is through a package manager or a curl one liner). It is the simple fact that the current installation instructions in the README fail, if you already have an existing .zshrc. So in @devinrhode2's case, and anyone else coming from OMZ, then they will have a problem because .zshrc already exists.

The absolute most simple solution here is just a note in the README that .zshrc must not already exist. Or if it does, then the sourcing of zprezto/init.sh must be manually added.

@PaBLoX-CL

@tombh 👍

@monfresh

+1 on adding a quick note in the README that you must move or rename your existing .zshrc. I just ran into this as well.

For a longer term solution, would it not be possible for Prezto to append the sourcing lines to any existing .zshrc?

@pickfire

+1 to curl ... | sh

@al-the-x

I see that PRs have been submitted (and declined) since #240 (circa 2012). See the more refined effort in #395. Are you interested in PRs for this issue, @sorin-ionescu? Happy to continue refining #395 or take another stab at it, if so.

@sorin-ionescu
Owner

Of coarse.

I have neglected to add an installation script to discourage beginners from using Prezto to prevent the issues list blowing up with dumb questions and even dumber pull requests in an effort to not replicate the Wild Wild West nature of Oh-My-Zsh.

@al-the-x

I can certainly understand that. The low-volume and volatility of Prezto it's one of my favorite features. ;)

Perhaps the proper management and grooming of a forked repository with submodules is sufficient to discourage adoption by absolute CLI noobs, but there's still a few non-trivial edge cases -- existing configuration files, for example -- that could be addressed to reduce the friction for intermediate-level developers.

Maybe some "declaration of intent" verbiage in the README would be welcomed, as well?

@sorin-ionescu
Owner

I don't want to discourage beginners from using Prezto. I want to discourage boneheads who will turn this issue list into Wild Wild West.

@tombh
tombh commented Sep 1, 2015

As has been explained by at least 7 people over 2.5 years, the main issue here is that the current README does not support people that have an existing .zshrc. Please, please, please can you try and understand this @sorin-ionescu

If anyone wants to support this, please comment on this PR: #955 (comment)

All we need to do is update the README, we don't need a one-line curl script to fix the main issue.

@sorin-ionescu
Owner

@tombh I understand. I just haven't cared because I've tried to keep Prezto away from people who don't know how to fix that issue. I have found it a useful barrier against people who would turn Prezto into the Wild Wild West Oh-My-Zsh is. They execute the instructions in the README. Prezto does not work. They go back to Oh-My-Zsh.

@bgates bgates referenced this issue in TheIronYard--Orlando/2015--FALL--ROR Sep 10, 2015
Closed

00 -- JEN HAMILTON #1

64 of 64 tasks complete
@ManiacalAce

Just commenting to supporting this.

There is needless confusion that a couple of sentences in the README could have resolved.
I also wasted a couple of hours on what turned out to be a silly problem.

If your goal is to be better than oh-my-zsh, you're going to be getting a lot of oh-my-zsh users coming to try this out, just like myself. All these folks will have an existing .zshrc files because they just want to try out prezto before committing to it.

@monfresh

Note that even users who have never used oh-my-zsh or any other similar tools could very well have an existing .zshrc. Deliberately refusing to make it easier for people to use your project is baffling to me. It seems like you're assuming that the only people who will have an existing .zshrc are oh-my-zsh users, and that if they can't immediately figure out what the problem is, they must be stupid boneheads.

In my experience, the easier you make it to install a project (I'm a big fan of automated scripts that do as much as possible for the user), and the better your documentation is, the less you have to respond to issues.

@sorin-ionescu
Owner

@monfresh There is an issue for an installation script: #365.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.