Commit 5770e00c3c920e173ac1cc324e8b5169e1e22cf1

Authored by mj
Exists in master

Merge commit 'd9bebbb3cd1164f7edefac7ba90419e1402bc57e' into update

Showing 124 changed files Side-by-side Diff

1   -locals.zsh
2   -log/.zsh_history
3   -projects.zsh
4   -custom
  1 +# custom files
  2 +custom/
5 3 !custom/plugins/example
6 4 !custom/example.zsh
7   -*.swp
8   -!custom/example.zshcache
  5 +
  6 +# temp files directories
9 7 cache/
  8 +log/
... ... @@ -0,0 +1,213 @@
  1 +<p align="center">
  2 + <img src="https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png" alt="Oh My Zsh">
  3 +</p>
  4 +
  5 +Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration. That sounds boring. Let's try this again.
  6 +
  7 +__Oh My Zsh is a way of life!__ Once installed, your terminal prompt will become the talk of the town _or your money back!_ Each time you interact with your command prompt, you'll be able to take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often.
  8 +
  9 +To learn more, visit [ohmyz.sh](http://ohmyz.sh) and follow [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter.
  10 +
  11 +## Getting Started
  12 +
  13 +### Prerequisites
  14 +
  15 +__Disclaimer:__ _Oh My Zsh works best on OS X and Linux._
  16 +
  17 +* Unix-based operating system (OS X or Linux)
  18 +* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH)
  19 +* `curl` or `wget` should be installed
  20 +* `git` should be installed
  21 +
  22 +### Basic Installation
  23 +
  24 +Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either `curl` or `wget`.
  25 +
  26 +#### via curl
  27 +
  28 +```shell
  29 +sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  30 +```
  31 +
  32 +#### via wget
  33 +
  34 +```shell
  35 +sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  36 +```
  37 +
  38 +## Using Oh My Zsh
  39 +
  40 +### Plugins
  41 +
  42 +Oh My Zsh comes with a shit load of plugins to take advantage of. You can take a look in the [plugins](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins) directory and/or the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins) to see what's currently available.
  43 +
  44 +#### Enabling Plugins
  45 +
  46 +If you spot a plugin (or several) that you would like to use with Oh My Zsh, you will need to edit the `~/.zshrc` file. Once you open it with your favorite editor, you'll see a spot to list all the plugins that you'd like Oh My Zsh to load in initialization.
  47 +
  48 +For example, this line might begin to look like...
  49 +
  50 +```shell
  51 +plugins=(git bundler osx rake ruby)
  52 +```
  53 +
  54 +#### Using Plugins
  55 +
  56 +Most plugins (should! we're working on this) include a __README__, which documents how to use them.
  57 +
  58 +### Themes
  59 +
  60 +We'll admit it. Early in the Oh My Zsh world, we may have gotten a bit too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out!
  61 +
  62 +#### Selecting a Theme
  63 +
  64 +_Robby's theme is the default one. It's not the fanciest one. It's not the simplest one. It's just right (for him)._
  65 +
  66 +Once you find a theme that you want to use, you will need to edit the `~/.zshrc` file. You'll see an environment variable (all caps) in there that looks like:
  67 +
  68 +```shell
  69 +ZSH_THEME="robbyrussell"
  70 +```
  71 +
  72 +To use a different theme, simply change the value to match the name of your desired theme. For example:
  73 +
  74 +```shell
  75 +ZSH_THEME="agnoster" # (this is one of the fancy ones)
  76 +```
  77 +
  78 +Open up a new terminal window and your prompt should look something like...
  79 +
  80 +![Agnoster theme](https://cloud.githubusercontent.com/assets/2618447/6316862/70f58fb6-ba03-11e4-82c9-c083bf9a6574.png)
  81 +
  82 +In case you did not find a suitable theme for your needs, please have a look at the wiki for [more of them](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes).
  83 +
  84 +If you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window.
  85 +
  86 +
  87 +```shell
  88 +ZSH_THEME="random" # (...please let it be pie... please be some pie..)
  89 +```
  90 +
  91 +
  92 +## Advanced Topics
  93 +
  94 +If you're the type that likes to get their hands dirty, these sections might resonate.
  95 +
  96 +### Advanced Installation
  97 +
  98 +Some users may want to change the default path, or manually install Oh My Zsh.
  99 +
  100 +#### Custom Directory
  101 +
  102 +The default location is `~/.oh-my-zsh` (hidden in your home directory)
  103 +
  104 +If you'd like to change the install directory with the `ZSH` environment variable, either by running `export ZSH=/your/path` before installing, or by setting it before the end of the install pipeline like this:
  105 +
  106 +```shell
  107 +export ZSH="$HOME/.dotfiles/oh-my-zsh"; sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  108 +```
  109 +
  110 +#### Manual Installation
  111 +
  112 +##### 1. Clone the repository:
  113 +
  114 +```shell
  115 +git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
  116 +```
  117 +
  118 +##### 2. *Optionally*, backup your existing `~/.zshrc` file:
  119 +
  120 +```shell
  121 +cp ~/.zshrc ~/.zshrc.orig
  122 +```
  123 +
  124 +##### 3. Create a new zsh configuration file
  125 +
  126 +You can create a new zsh config file by copying the template that we included for you.
  127 +
  128 +```shell
  129 +cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
  130 +```
  131 +
  132 +##### 4. Change your default shell
  133 +
  134 +```shell
  135 +chsh -s /bin/zsh
  136 +```
  137 +
  138 +##### 5. Initialize your new zsh configuration
  139 +
  140 +Once you open up a new terminal window, it should load zsh with Oh My Zsh's configuration.
  141 +
  142 +### Installation Problems
  143 +
  144 +If you have any hiccups installing, here are a few common fixes.
  145 +
  146 +* You _might_ need to modify your `PATH` in `~/.zshrc` if you're not able to find some commands after switching to `oh-my-zsh`.
  147 +* If you installed manually or changed the install location, check the `ZSH` environment variable in `~/.zshrc`.
  148 +
  149 +### Custom Plugins and Themes
  150 +
  151 +If you want to override any of the default behaviors, just add a new file (ending in `.zsh`) in the `custom/` directory.
  152 +
  153 +If you have many functions that go well together, you can put them as a `XYZ.plugin.zsh` file in the `custom/plugins/` directory and then enable this plugin.
  154 +
  155 +If you would like to override the functionality of a plugin distributed with Oh My Zsh, create a plugin of the same name in the `custom/plugins/` directory and it will be loaded instead of the one in `plugins/`.
  156 +
  157 +## Getting Updates
  158 +
  159 +By default, you will be prompted to check for upgrades every few weeks. If you would like `oh-my-zsh` to automatically upgrade itself without prompting you, set the following in your `~/.zshrc`:
  160 +
  161 +```shell
  162 +DISABLE_UPDATE_PROMPT=true
  163 +```
  164 +
  165 +To disable automatic upgrades, set the following in your `~/.zshrc`:
  166 +
  167 +```shell
  168 +DISABLE_AUTO_UPDATE=true
  169 +```
  170 +
  171 +### Manual Updates
  172 +
  173 +If you'd like to upgrade at any point in time (maybe someone just released a new plugin and you don't want to wait a week?) you just need to run:
  174 +
  175 +```shell
  176 +upgrade_oh_my_zsh
  177 +```
  178 +
  179 +Magic!
  180 +
  181 +## Uninstalling Oh My Zsh
  182 +
  183 +Oh My Zsh isn't for everyone. We'll miss you, but we want to make this an easy breakup.
  184 +
  185 +If you want to uninstall `oh-my-zsh`, just run `uninstall_oh_my_zsh` from the command-line. It will remove itself and revert your previous `bash` or `zsh` configuration.
  186 +
  187 +## Contributing
  188 +
  189 +I'm far from being a [Zsh](http://www.zsh.org/) expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!
  190 +
  191 +We also need people to test out pull-requests. So take a look through [the open issues](https://github.com/robbyrussell/oh-my-zsh/issues) and help where you can.
  192 +
  193 +### Do NOT send us themes
  194 +
  195 +We have (more than) enough themes for the time being. Please add your theme to the [external themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) wiki page.
  196 +
  197 +## Contributors
  198 +
  199 +Oh My Zsh has a vibrant community of happy users and delightful contributors. Without all the time and help from our contributors, it wouldn't be so awesome.
  200 +
  201 +Thank you so much!
  202 +
  203 +## Follow Us
  204 +
  205 +We have an [@ohmyzsh](https://twitter.com/ohmyzsh) Twitter account. You should follow it.
  206 +
  207 +## Merchandise
  208 +
  209 +We have [stickers](http://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](http://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town!
  210 +
  211 +## License
  212 +
  213 +Oh My Zsh is released under the [MIT license](LICENSE.txt).
... ... @@ -53,11 +53,6 @@ main() {
53 53 echo "Error: git is not installed"
54 54 exit 1
55 55 }
56   - env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
57   - printf "Error: git clone of oh-my-zsh repo failed\n"
58   - exit 1
59   - }
60   -
61 56 # The Windows (MSYS) Git is not compatible with normal use on cygwin
62 57 if [ "$OSTYPE" = cygwin ]; then
63 58 if git --version | grep msysgit > /dev/null; then
... ... @@ -66,6 +61,11 @@ main() {
66 61 exit 1
67 62 fi
68 63 fi
  64 + env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
  65 + printf "Error: git clone of oh-my-zsh repo failed\n"
  66 + exit 1
  67 + }
  68 +
69 69  
70 70 printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n"
71 71 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
... ... @@ -80,12 +80,6 @@ main() {
80 80 " ~/.zshrc > ~/.zshrc-omztemp
81 81 mv -f ~/.zshrc-omztemp ~/.zshrc
82 82  
83   - printf "${BLUE}Copying your current PATH and adding it to the end of ~/.zshrc for you.${NORMAL}\n"
84   - sed "/export PATH=/ c\\
85   - export PATH=\"$PATH\"
86   - " ~/.zshrc > ~/.zshrc-omztemp
87   - mv -f ~/.zshrc-omztemp ~/.zshrc
88   -
89 83 # If this user's login shell is not already "zsh", attempt to switch.
90 84 TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
91 85 if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then