From 8c4322c6e078e821823f29c674ebc57ce8dbc4a9 Mon Sep 17 00:00:00 2001 From: Chris Ng Date: Sun, 1 Dec 2013 10:45:38 -0800 Subject: [PATCH 1/3] Added support for custom aliases and functions --- templates/zshrc.zsh-template | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 1dfb6998c..ff78c82c0 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -45,3 +45,10 @@ plugins=(git) source $ZSH/oh-my-zsh.sh # Customize to your needs... +if [ -f ~/.aliases ] ; then + source ~/.aliases +fi + +if [ -f ~/.functions ] ; then + source ~/.functions +fi From 3ae132cbd9c26d445f5e3cd052be16b9ae9e6aa7 Mon Sep 17 00:00:00 2001 From: Chris Ng Date: Sun, 1 Dec 2013 16:43:55 -0800 Subject: [PATCH 2/3] Updated to point to my git repo (chaoselixir) --- README.textile | 6 +++--- tools/install.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.textile b/README.textile index 86dd5da22..5946bf97b 100644 --- a/README.textile +++ b/README.textile @@ -14,18 +14,18 @@ You can install this via the command line with either `curl` or `wget`. h4. via `curl` -@curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh@ +@curl -L https://github.com/chaoselixir/oh-my-zsh/raw/master/tools/install.sh | sh@ h4. via `wget` -@wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh@ +@wget --no-check-certificate https://github.com/chaoselixir/oh-my-zsh/raw/master/tools/install.sh -O - | sh@ h3. The manual way 1. Clone the repository - @git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ + @git clone git://github.com/chaoselixir/oh-my-zsh.git ~/.oh-my-zsh@ 2. *OPTIONAL* Backup your existing ~/.zshrc file diff --git a/tools/install.sh b/tools/install.sh index a2bd5665a..b0b432f63 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -5,7 +5,7 @@ then fi echo "\033[0;34mCloning Oh My Zsh...\033[0m" -hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || { +hash git >/dev/null && /usr/bin/env git clone https://github.com/chaoselixir/oh-my-zsh.git ~/.oh-my-zsh || { echo "git not installed" exit } From 5a3001f2b047af6b54460364a47e28ed465fedb3 Mon Sep 17 00:00:00 2001 From: Chris Ng Date: Sun, 1 Dec 2013 16:44:16 -0800 Subject: [PATCH 3/3] Updated to dynamicly load dotfiles --- templates/zshrc.zsh-template | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index ff78c82c0..7cc1da4ca 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -5,7 +5,7 @@ ZSH=$HOME/.oh-my-zsh # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. -ZSH_THEME="robbyrussell" +ZSH_THEME="gnzh" # Example aliases # alias zshconfig="mate ~/.zshrc" @@ -18,7 +18,7 @@ ZSH_THEME="robbyrussell" # DISABLE_AUTO_UPDATE="true" # Uncomment to change how often before auto-updates occur? (in days) -# export UPDATE_ZSH_DAYS=13 +export UPDATE_ZSH_DAYS=15 # Uncomment following line if you want to disable colors in ls # DISABLE_LS_COLORS="true" @@ -45,10 +45,11 @@ plugins=(git) source $ZSH/oh-my-zsh.sh # Customize to your needs... -if [ -f ~/.aliases ] ; then - source ~/.aliases -fi +for file in ~/.{path,exports,aliases,functions,extra}; do + [ -r "$file" ] && [ -f "$file" ] && source "$file" +done +unset file -if [ -f ~/.functions ] ; then - source ~/.functions -fi +#export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/Users/cng/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/MacGPG2/bin:/Users/cng/.ec2/bin:/Users/cng/.rvm/bin:/usr/local/sbin +#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. +#PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting