dev-setup icon indicating copy to clipboard operation
dev-setup copied to clipboard

How to add zsh and oh-my-zsh?

Open damianesteban opened this issue 8 years ago • 4 comments

I need to setup 10 new Macs and I've looked at various solutions including boxen and other shell scripts. This is by far the best solution (for my purposes) that I've seen.

If I wanted to install zsh and oh-my-zsh, what would I have to do (besides installing zsh via homebrew)? Specifically, what's the best place to run the oh-my-zsh installer script?

Thanks for the great work.

damianesteban avatar Nov 12 '16 23:11 damianesteban

Hi @damianesteban, thanks for the feedback!

I'm not a Zsh user myself, but this seems like a good resource:

http://sourabhbajaj.com/mac-setup/iTerm/zsh.html

If you're doing a good amount of config like in the article above, you could create a new shell script to hold all of the commands, ie zsh.sh. See similar scripts like pydata.sh or aws.sh as examples.

If you're using the .dots script to chain the shell scripts together, just add an entry to call your zsh.sh script.

        if [ $ARG == "zsh" ] || [ $ARG == "all" ]; then
            # Run the zsh.sh Script
            echo "------------------------------"
            echo "Setting up Zsh."
            echo "------------------------------"
            echo ""
            ./zsh.sh
        fi

Then from the command line you just run something like this:

$ ./.dots bootstrap osxprep brew osx zsh

donnemartin avatar Nov 13 '16 12:11 donnemartin

Thanks so much, this worked well. I'll post the full solution so other zsh users can benefit from it once I clean it up.

damianesteban avatar Nov 13 '16 20:11 damianesteban

@damianesteban great, please feel free to submit a pull request once it's ready.

donnemartin avatar Nov 25 '16 12:11 donnemartin

@donnemartin you should check these out: https://github.com/robbyrussell/oh-my-zsh https://github.com/spf13/spf13-vim

Created a quick PR for these https://github.com/donnemartin/dev-setup/pull/62

josephmilla avatar Apr 02 '17 21:04 josephmilla