diff --git a/.gitignore b/.gitignore index e80740950775..f84db6dc27af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ locals.zsh log/.zsh_history projects.zsh +custom/*.zsh +!custom/example.zsh \ No newline at end of file diff --git a/README.textile b/README.textile index 1735e150f822..9972cf246cd7 100644 --- a/README.textile +++ b/README.textile @@ -43,8 +43,13 @@ TODO: Update this.. * much much more.. h2. Useful + the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty for tips. +h3. Customization + +If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. + h3. Uninstalling If you want to uninstall it, just run @uninstall_oh_my_zsh@ from the command line and it'll remove itself and revert you to bash (or your previous zsh config). diff --git a/projects.zsh-example b/custom/example.zsh similarity index 100% rename from projects.zsh-example rename to custom/example.zsh diff --git a/aliases.zsh b/lib/aliases.zsh similarity index 100% rename from aliases.zsh rename to lib/aliases.zsh diff --git a/colors.zsh b/lib/colors.zsh similarity index 100% rename from colors.zsh rename to lib/colors.zsh diff --git a/completion.zsh b/lib/completion.zsh similarity index 100% rename from completion.zsh rename to lib/completion.zsh diff --git a/functions.zsh b/lib/functions.zsh similarity index 100% rename from functions.zsh rename to lib/functions.zsh diff --git a/git.zsh b/lib/git.zsh similarity index 100% rename from git.zsh rename to lib/git.zsh diff --git a/grep.zsh b/lib/grep.zsh similarity index 100% rename from grep.zsh rename to lib/grep.zsh diff --git a/history.zsh b/lib/history.zsh similarity index 89% rename from history.zsh rename to lib/history.zsh index 356b6498b32c..527c3276255b 100644 --- a/history.zsh +++ b/lib/history.zsh @@ -1,8 +1,8 @@ ## Command history configuration -# HISTFILE=$HOME/.zsh_history -HISTSIZE=5000 -SAVEHIST=5000 +HISTSIZE=10000 +SAVEHIST=10000 + setopt hist_ignore_dups # ignore duplication command history list setopt share_history # share command history data diff --git a/key-bindings.zsh b/lib/key-bindings.zsh similarity index 100% rename from key-bindings.zsh rename to lib/key-bindings.zsh diff --git a/prompt.zsh b/lib/prompt.zsh similarity index 100% rename from prompt.zsh rename to lib/prompt.zsh diff --git a/rake_completion.zsh b/lib/rake_completion.zsh similarity index 95% rename from rake_completion.zsh rename to lib/rake_completion.zsh index 239fe15a3502..c425a625e1d2 100644 --- a/rake_completion.zsh +++ b/lib/rake_completion.zsh @@ -17,7 +17,7 @@ _rake () { fi } -compdef _rake rake +compctl -K _rake rake function _cap_does_task_list_need_generating () { if [ ! -f .cap_tasks~ ]; then return 0; @@ -39,4 +39,4 @@ function _cap () { fi } -compdef _cap cap +compctl -K _cap cap diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index b931f558aaa7..6e73519b5d3d 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -2,4 +2,7 @@ # Load all of the config files in ~/oh-my-zsh that end in .zsh # TIP: Add files you don't want in git to .gitignore -for config_file ($ZSH/*.zsh) source $config_file +for config_file ($ZSH/lib/*.zsh) source $config_file + +# Load all of your custom configurations from custom/ +for config_file ($ZSH/custom/*.zsh) source $config_file