From fdb3c0e68d36d20d1b75163755d568d42def5ac1 Mon Sep 17 00:00:00 2001 From: Anton Eicher Date: Wed, 19 Dec 2012 07:22:03 -0800 Subject: [PATCH 001/188] Added check for .git directory in current, before wasting time querying git. This saves seconds on my pc. --- plugins/git/git.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 154aa6db..79300a16 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -73,12 +73,14 @@ alias gsd='git svn dcommit' # Usage example: git pull origin $(current_branch) # function current_branch() { + if [ ! -d .git ]; then return; fi ref=$(git symbolic-ref HEAD 2> /dev/null) || \ ref=$(git rev-parse --short HEAD 2> /dev/null) || return echo ${ref#refs/heads/} } function current_repository() { + if [ ! -d .git ]; then return; fi ref=$(git symbolic-ref HEAD 2> /dev/null) || \ ref=$(git rev-parse --short HEAD 2> /dev/null) || return echo $(git remote -v | cut -d':' -f 2) From 9674a96b5bc296a767c2560757626bf2bc3a9ad3 Mon Sep 17 00:00:00 2001 From: Frank Louwers Date: Wed, 13 Feb 2013 12:02:36 +0100 Subject: [PATCH 002/188] [pj-plugin] delete ugly ls -l | awk print $9 thing to use something not depending on date format + add support for projects with spaces in them --- plugins/pj/pj.plugin.zsh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index ba3765b8..b98bfec3 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/plugins/pj/pj.plugin.zsh @@ -18,8 +18,11 @@ function pj() { file=$1 if [[ "open" == "$file" ]] then - file=$2 + shift + file=$* cmd=(${(s: :)EDITOR}) + else + file=$* fi for project in $PROJECT_PATHS; do @@ -36,7 +39,14 @@ function pj() { alias pjo="pj open" function _pj () { - compadd `/bin/ls -l $PROJECT_PATHS 2>/dev/null | awk '{ print $9 }'` + # might be possible to improve this using glob, without the basename trick + typeset -a projects + foreach i ($PROJECT_PATHS/*) + do + projects+=`basename $i` + done + + _arguments '*:file:($projects)' } compdef _pj pj From df67f2ee30dbad61117e1886b0a4de326cb6daf7 Mon Sep 17 00:00:00 2001 From: Frank Louwers Date: Wed, 13 Feb 2013 13:39:47 +0100 Subject: [PATCH 003/188] [pj-plugin] avoid using basename. migth be (a lot?) faster --- plugins/pj/pj.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index b98bfec3..dac56118 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/plugins/pj/pj.plugin.zsh @@ -43,7 +43,7 @@ function _pj () { typeset -a projects foreach i ($PROJECT_PATHS/*) do - projects+=`basename $i` + projects+=(${i##*/}) done _arguments '*:file:($projects)' From 244533320062afd470e4aa6aab92e1532cf2fec3 Mon Sep 17 00:00:00 2001 From: Rimenes Ribeiro Date: Tue, 24 Sep 2013 15:20:52 -0300 Subject: [PATCH 004/188] Add reload and status alises to postgres --- plugins/postgres/postgres.plugin.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/postgres/postgres.plugin.zsh b/plugins/postgres/postgres.plugin.zsh index cdd142e9..c2dbef24 100644 --- a/plugins/postgres/postgres.plugin.zsh +++ b/plugins/postgres/postgres.plugin.zsh @@ -1,6 +1,8 @@ -# Aliases to stop, start and restart Postgres -# Paths noted below are for Postgress installed via Homebrew on OSX +# Aliases to control Postgres +# Paths noted below are for Postgres installed via Homebrew on OSX alias startpost='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' alias stoppost='pg_ctl -D /usr/local/var/postgres stop -s -m fast' -alias restartpost='stoppost && sleep 1 && startpost' \ No newline at end of file +alias restartpost='stoppost && sleep 1 && startpost' +alias reloadpost='pg_ctl reload -D /usr/local/var/postgres -s' +alias statuspost='pg_ctl status -D /usr/local/var/postgres -s' \ No newline at end of file From d608fbfc7fcabf9994f8064e67670e69130d2ee1 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Tue, 15 Oct 2013 14:34:03 +0200 Subject: [PATCH 005/188] Make the virtualenv plugin themable --- plugins/virtualenv/virtualenv.plugin.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/virtualenv/virtualenv.plugin.zsh b/plugins/virtualenv/virtualenv.plugin.zsh index 8e06450b..e250eb63 100644 --- a/plugins/virtualenv/virtualenv.plugin.zsh +++ b/plugins/virtualenv/virtualenv.plugin.zsh @@ -1,7 +1,6 @@ function virtualenv_prompt_info(){ - if [[ -n $VIRTUAL_ENV ]]; then - printf "%s[%s] " "%{${fg[yellow]}%}" ${${VIRTUAL_ENV}:t} - fi + [[ -n ${VIRTUAL_ENV} ]] || return + echo "${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}" } # disables prompt mangling in virtual_env/bin/activate From 9b811fb625c03c30a766191cdf65a1c7c1fd96b2 Mon Sep 17 00:00:00 2001 From: Michael Orr Date: Fri, 6 Dec 2013 17:31:35 -0500 Subject: [PATCH 006/188] accidentally blew away a git config setting used for another purpose, renaming in order to distinguish --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 305a77af..a1396653 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -13,7 +13,7 @@ parse_git_dirty() { local SUBMODULE_SYNTAX='' local GIT_STATUS='' local CLEAN_MESSAGE='nothing to commit (working directory clean)' - if [[ "$(command git config --get oh-my-zsh.hide-status)" != "1" ]]; then + if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then if [[ $POST_1_7_2_GIT -gt 0 ]]; then SUBMODULE_SYNTAX="--ignore-submodules=dirty" fi From 3976b93f3931a7ebc913576015ff395dcd495d95 Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Sun, 23 Mar 2014 15:59:35 -0400 Subject: [PATCH 007/188] Fixed which output at each new shell creation --- themes/gallois.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme index f1057a9a..f31d2195 100644 --- a/themes/gallois.zsh-theme +++ b/themes/gallois.zsh-theme @@ -18,7 +18,7 @@ else if which rbenv &> /dev/null; then RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1' else - if [[ -n `which chruby_prompt_info` && -n `chruby_prompt_info` ]]; then + if [[ -n `which chruby_prompt_info &> /dev/null` && -n `chruby_prompt_info` ]]; then RPS1='$(git_custom_status)%{$fg[red]%}[`chruby_prompt_info`]%{$reset_color%} $EPS1' else RPS1='$(git_custom_status) $EPS1' From b2ce306c4f49ebb1ef2bde5b86d553ce6ea674aa Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Tue, 25 Mar 2014 23:37:28 -0400 Subject: [PATCH 008/188] Simplified gallois RPS1 setup using some helpful scripts --- themes/gallois.zsh-theme | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme index f31d2195..d383ed58 100644 --- a/themes/gallois.zsh-theme +++ b/themes/gallois.zsh-theme @@ -11,19 +11,11 @@ git_custom_status() { fi } -#RVM and git settings -if [[ -s ~/.rvm/scripts/rvm ]] ; then - RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1' -else - if which rbenv &> /dev/null; then - RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1' - else - if [[ -n `which chruby_prompt_info &> /dev/null` && -n `chruby_prompt_info` ]]; then - RPS1='$(git_custom_status)%{$fg[red]%}[`chruby_prompt_info`]%{$reset_color%} $EPS1' - else - RPS1='$(git_custom_status) $EPS1' - fi - fi -fi +# RVM component of prompt +ZSH_THEME_RVM_PROMPT_PREFIX="%{$fg[red]%}[" +ZSH_THEME_RVM_PROMPT_SUFFIX="]%{$reset_color%}" + +# Combine it all into a final right-side prompt +RPS1='$(git_custom_status)$(ruby_prompt_info) $EPS1' PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b ' From b2ea7d3ec12152ab4d864c27c33d8b9396c68858 Mon Sep 17 00:00:00 2001 From: Stanislav Schultz Date: Fri, 28 Mar 2014 20:25:13 +0300 Subject: [PATCH 009/188] Add Ruby 2.1.1 support to rvm plugin --- plugins/rvm/rvm.plugin.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 3bde154d..ad23e18d 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -6,6 +6,7 @@ alias gemsets='rvm gemset list' local ruby18='ruby-1.8.7' local ruby19='ruby-1.9.3' local ruby20='ruby-2.0.0' +local ruby21='ruby-2.1.1' function rb18 { if [ -z "$1" ]; then @@ -40,6 +41,17 @@ function rb20 { _rb20() {compadd `ls -1 $rvm_path/gems | grep "^$ruby20@" | sed -e "s/^$ruby20@//" | awk '{print $1}'`} compdef _rb20 rb20 +function rb21 { + if [ -z "$1" ]; then + rvm use "$ruby21" + else + rvm use "$ruby21@$1" + fi +} + +_rb21() {compadd `ls -1 $rvm_path/gems | grep "^$ruby21@" | sed -e "s/^$ruby21@//" | awk '{print $1}'`} +compdef _rb21 rb21 + function rvm-update { rvm get head } From 73bf940c34fe359c27031a1144237ccaad7d2b9b Mon Sep 17 00:00:00 2001 From: Nicolas Brousse Date: Wed, 23 Apr 2014 19:44:59 +0200 Subject: [PATCH 010/188] Update brew.plugin.zsh --- plugins/brew/brew.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index c2e95884..f9497aef 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1 +1,2 @@ alias brews='brew list -1' +alias bubu="brew update && brew upgrade" From 2c19c0e59e6a3fd1f844ee6f5f883e199a3c1adc Mon Sep 17 00:00:00 2001 From: ncanceill Date: Sat, 24 May 2014 08:31:59 +0200 Subject: [PATCH 011/188] typo, fixes #1806 --- plugins/ssh-agent/ssh-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 2fb8d546..610ad34d 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -1,7 +1,7 @@ # # INSTRUCTIONS # -# To enabled agent forwarding support add the following to +# To enable agent forwarding support add the following to # your .zshrc file: # # zstyle :omz:plugins:ssh-agent agent-forwarding on From 0b4bf905f50191c885315eec5536a973ea96b4cf Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 23 May 2014 22:06:30 -0400 Subject: [PATCH 012/188] Minor markup edits --- README.textile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.textile b/README.textile index 4325c91e..28bab6b2 100644 --- a/README.textile +++ b/README.textile @@ -10,22 +10,22 @@ h2. Setup h3. The automatic installer... (do you trust me?) -You can install this via the command line with either `curl` or `wget`. +You can install this via the command line with either @curl@ or @wget@. -h4. via `curl` +h4. via @curl@ @curl -L http://install.ohmyz.sh | sh@ -h4. via `wget` +h4. via @wget@ @wget --no-check-certificate http://install.ohmyz.sh -O - | sh@ h4. Optional: change the install directory -The default location is `~/.oh-my-zsh` (hidden in your home directory). +The default location is @~/.oh-my-zsh@ (hidden in your home directory). You can change the install directory with the ZSH environment variable, either -by running `export ZSH=/your/path` before installing, or setting it before the +by running @export ZSH=/your/path@ before installing, or setting it before the end of the install pipeline like this: @curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@ @@ -37,7 +37,7 @@ h3. The manual way @git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ -2. *OPTIONAL* Backup your existing ~/.zshrc file +2. *OPTIONAL* Backup your existing @~/.zshrc@ file @cp ~/.zshrc ~/.zshrc.orig@ @@ -53,9 +53,9 @@ h3. The manual way h3. Problems? -You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to _Oh My Zsh_. +You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to _Oh My Zsh_. -If you installed manually or changed the install location, check ZSH in ~/.zshrc +If you installed manually or changed the install location, check ZSH in @~/.zshrc@ h2. Usage @@ -72,16 +72,16 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo h3. Customization If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. -If you have many functions which go well together you can put them as a *.plugin.zsh file in the @custom/plugins/@ directory and then enable this plugin. +If you have many functions which go well together you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin. 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/@. h3. Updates -By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your ~/.zshrc +By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your @~/.zshrc@ @DISABLE_UPDATE_PROMPT=true@ -To disable updates entirely, put this in your ~/.zshrc +To disable updates entirely, put this in your @~/.zshrc@ @DISABLE_AUTO_UPDATE=true@ From 8355233f7fc055d8446c7ebf50569202fa5bd1f5 Mon Sep 17 00:00:00 2001 From: Trevor Strieber Date: Thu, 8 May 2014 14:19:37 -0400 Subject: [PATCH 013/188] Fixing typo. --- plugins/colorize/colorize.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index 0696607d..dc0947d4 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -1,4 +1,4 @@ -# Plugin for highligthing file content +# Plugin for highlighting file content # Plugin highlights file content based on the filename extension. # If no highlighting method supported for given extension then it tries # guess it by looking for file content. @@ -25,4 +25,4 @@ colorize_via_pygmentize() { pygmentize -g "$FNAME" fi done -} \ No newline at end of file +} From 9590b96b3f0dc8e2f4a87b632ff59eab28a0081e Mon Sep 17 00:00:00 2001 From: Adam Luikart Date: Mon, 6 Feb 2012 12:22:07 -0600 Subject: [PATCH 014/188] Write the update file even if `CLOBBER` is unset. --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 0f8c9c39..5c8ce3a5 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -5,7 +5,7 @@ function _current_epoch() { } function _update_zsh_update() { - echo "LAST_EPOCH=$(_current_epoch)" > ~/.zsh-update + echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update } function _upgrade_zsh() { From c1f5a1792be3f11f9b298a11232bc5913c8b71a2 Mon Sep 17 00:00:00 2001 From: Brian Hartvigsen Date: Thu, 13 Feb 2014 17:33:27 -0700 Subject: [PATCH 015/188] This is already done in lib/theme-and-appearance.zsh and supports Darwin/BSD/etc --- plugins/common-aliases/common-aliases.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index b19650fe..0ee17014 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -3,7 +3,6 @@ # # ls, the common ones I use a lot shortened for rapid fire usage -alias ls='ls --color' #I like color alias l='ls -lFh' #size,show type,human readable alias la='ls -lAFh' #long list,show almost all,show type,human readable alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable From 5e601d6515f9ee51c733aea71acf6757066943e2 Mon Sep 17 00:00:00 2001 From: Brian Hartvigsen Date: Thu, 13 Feb 2014 17:41:38 -0700 Subject: [PATCH 016/188] Fix dud alias. Switch --max-depth for just -d As far as I can tell (tested on Linux & Darwin, BSD man page seems to agree), `-d` is pretty univerally accepted as the depth argument. So instead of doing a test, we can just use -d and call it a day. --- plugins/common-aliases/common-aliases.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 0ee17014..228a39da 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -38,7 +38,7 @@ alias -g NE="2> /dev/null" alias -g NUL="> /dev/null 2>&1" alias -g P="2>&1| pygmentize -l pytb" -alias dud='du --max-depth=1 -h' +alias dud='du -d 1 -h' alias duf='du -sh *' alias fd='find . -type d -name' alias ff='find . -type f -name' From 8d976e02b1da43ec74c1ca6f50584eed566ff73a Mon Sep 17 00:00:00 2001 From: Mark Feltner Date: Tue, 14 Jan 2014 23:13:49 -0600 Subject: [PATCH 017/188] fix(tools/check_for_upgrade): Don't source profile Reverts #2296, but mostly #1883. There is no need to source ~/.profile when this script is read. oh-my-zsh writes no configuration data in ~/.profile. If the user wishes to use data within ~/.profile, then they should source it in another place. Fixes #2315 --- tools/check_for_upgrade.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 5c8ce3a5..c5fd0cce 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -20,8 +20,6 @@ if [[ -z "$epoch_target" ]]; then epoch_target=13 fi -[ -f ~/.profile ] && source ~/.profile - if [ -f ~/.zsh-update ] then . ~/.zsh-update From 4c64cf4a253608022caeda0f83b6ae73b7a8513c Mon Sep 17 00:00:00 2001 From: Simon Courtois Date: Wed, 9 Apr 2014 12:32:42 +0200 Subject: [PATCH 018/188] Replacing DISABLE_CORRECTION with ENABLE_CORRECTION in zshrc template Since commands auto-correction must be explicitly enable with the ENABLE_CORRECTION envvar, this commit replaces the unaccurate example in the zshrc template. --- templates/zshrc.zsh-template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 5b2a6cf4..e08c1391 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -26,8 +26,8 @@ ZSH_THEME="robbyrussell" # Uncomment the following line to disable auto-setting terminal title. # DISABLE_AUTO_TITLE="true" -# Uncomment the following line to disable command auto-correction. -# DISABLE_CORRECTION="true" +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. # COMPLETION_WAITING_DOTS="true" From cd8d5c4410f96ee16a6349a0cf7bcac882e37604 Mon Sep 17 00:00:00 2001 From: Simon Courtois Date: Wed, 9 Apr 2014 18:13:19 +0200 Subject: [PATCH 019/188] Defining nocorrect aliases only when ENABLE_CORRECTION is "true" This commit move the nocorrect aliases definition so they're called only when the user set ENABLE_CORRECTION to "true" to activate commands autocorrection. --- lib/correction.zsh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/correction.zsh b/lib/correction.zsh index 47eb83b1..35771474 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -1,13 +1,13 @@ -alias man='nocorrect man' -alias mv='nocorrect mv' -alias mysql='nocorrect mysql' -alias mkdir='nocorrect mkdir' -alias gist='nocorrect gist' -alias heroku='nocorrect heroku' -alias ebuild='nocorrect ebuild' -alias hpodder='nocorrect hpodder' -alias sudo='nocorrect sudo' - if [[ "$ENABLE_CORRECTION" == "true" ]]; then + alias man='nocorrect man' + alias mv='nocorrect mv' + alias mysql='nocorrect mysql' + alias mkdir='nocorrect mkdir' + alias gist='nocorrect gist' + alias heroku='nocorrect heroku' + alias ebuild='nocorrect ebuild' + alias hpodder='nocorrect hpodder' + alias sudo='nocorrect sudo' + setopt correct_all fi From b64e695b35db8bf0ff01433669a3adc4ee04341c Mon Sep 17 00:00:00 2001 From: Simon Courtois Date: Wed, 9 Apr 2014 18:16:57 +0200 Subject: [PATCH 020/188] Ordering nocorrect aliases alphabetically --- lib/correction.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/correction.zsh b/lib/correction.zsh index 35771474..3e1415a0 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -1,12 +1,12 @@ if [[ "$ENABLE_CORRECTION" == "true" ]]; then - alias man='nocorrect man' - alias mv='nocorrect mv' - alias mysql='nocorrect mysql' - alias mkdir='nocorrect mkdir' + alias ebuild='nocorrect ebuild' alias gist='nocorrect gist' alias heroku='nocorrect heroku' - alias ebuild='nocorrect ebuild' alias hpodder='nocorrect hpodder' + alias man='nocorrect man' + alias mkdir='nocorrect mkdir' + alias mv='nocorrect mv' + alias mysql='nocorrect mysql' alias sudo='nocorrect sudo' setopt correct_all From c0b094cf859899bd78db43a4dc59a0ae6786d49d Mon Sep 17 00:00:00 2001 From: pangratz Date: Mon, 3 Feb 2014 10:35:40 +0100 Subject: [PATCH 021/188] Fix function/alias naming clash between bower and bundle plugin Since the `bower` plugin specifies a `bi` alias and `bundle` plugin specifies a `bi` function, there is a name clash when using both plugins, which results in the message "Can't 'bundle install' outside a bundled project" when trying to execute `bower`. This adresses #2486 --- plugins/bundler/bundler.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 3338d78b..8571eeda 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -3,6 +3,7 @@ alias bl="bundle list" alias bp="bundle package" alias bo="bundle open" alias bu="bundle update" +alias bi="bundle_install" # The following is based on https://github.com/gma/bundler-exec @@ -15,7 +16,7 @@ done ## Functions -bi() { +bundle_install() { if _bundler-installed && _within-bundled-project; then local bundler_version=`bundle version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then From 3c485db8c73bfebf379f3e9382eb8f300b608bd8 Mon Sep 17 00:00:00 2001 From: r3dDoX Date: Sat, 24 May 2014 12:15:26 +0200 Subject: [PATCH 022/188] replaced hardcoded origin/{branch-name} with @{upstream} which gets the upstream branch since git 1.7.0 --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 305a77af..3eca8a6c 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -54,7 +54,7 @@ git_remote_status() { # Checks if there are commits ahead from remote function git_prompt_ahead() { - if $(echo "$(command git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then + if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then echo "$ZSH_THEME_GIT_PROMPT_AHEAD" fi } From 59c8fcc712556a4c0b612898073e212877c21d60 Mon Sep 17 00:00:00 2001 From: r3dDoX Date: Sat, 24 May 2014 12:19:46 +0200 Subject: [PATCH 023/188] added new function to get number of commits ahead of remote --- lib/git.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/git.zsh b/lib/git.zsh index 3eca8a6c..d6cee37c 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -59,6 +59,13 @@ function git_prompt_ahead() { fi } +# Gets the number of commits ahead from remote +function git_commits_ahead() { + if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then + echo "$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ')" + fi +} + # Formats prompt string for current git commit short SHA function git_prompt_short_sha() { SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER" From 1ad1c52797e99c1060301e55cb726e290a06d063 Mon Sep 17 00:00:00 2001 From: Sean McCann Date: Fri, 16 May 2014 11:46:48 -0400 Subject: [PATCH 024/188] Move aliases to 'custom' section of .zshrc template By convention, user-specific aliases are kept in each user's .zshrc file. The .zshrc template provided by oh-my-zsh has an area for example aliases, though these were being loaded before other aliases in libs, plugins, and themes. As a result, personal aliases could be overwritten by these other aliases as they are loaded. To make personal customization easier, the sample aliases section of the .zshrc template has been moved to the area dedicated for personal customization. This section of the configuration is processed after all other items are loaded, preventing personal aliases and exports from being inadvertently clobbered by oh-my-zsh. --- templates/zshrc.zsh-template | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index e08c1391..c77b5484 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -7,10 +7,6 @@ export ZSH=$HOME/.oh-my-zsh # time that oh-my-zsh is loaded. ZSH_THEME="robbyrussell" -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" @@ -72,3 +68,12 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH # ssh # export SSH_KEY_PATH="~/.ssh/dsa_id" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" From 514693125b12d4b4cd099dcb09174f7bfd9a5b0e Mon Sep 17 00:00:00 2001 From: r3dDoX Date: Mon, 26 May 2014 10:47:51 +0200 Subject: [PATCH 025/188] added prefix/suffix variable for customizability --- lib/git.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index d6cee37c..a52f82de 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -62,7 +62,8 @@ function git_prompt_ahead() { # Gets the number of commits ahead from remote function git_commits_ahead() { if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then - echo "$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ')" + COMMITS=$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ') + echo "$ZSH_THEME_GIT_COMMITS_AHEAD_PREFIX$COMMITS$ZSH_THEME_GIT_COMMITS_AHEAD_SUFFIX" fi } From 6fc241b0d2f4690f7fd00f26eb91045a04c05fbd Mon Sep 17 00:00:00 2001 From: Frank Behrens Date: Fri, 18 Apr 2014 11:26:06 +0200 Subject: [PATCH 026/188] extract plugin will unzip *.sublime-package files --- plugins/extract/extract.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 7352e5ba..a6e16ddf 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -52,7 +52,7 @@ function extract() { (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; (*.Z) uncompress "$1" ;; - (*.zip|*.war|*.jar) unzip "$1" -d $extract_dir ;; + (*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.7z) 7za x "$1" ;; (*.deb) From b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1 Mon Sep 17 00:00:00 2001 From: Josh Datko Date: Tue, 27 May 2014 10:34:03 -0600 Subject: [PATCH 027/188] Adds itunes vol command. Adds itunes vol, which takes an argument from 0 to 100 to set the volume from the shell. --- plugins/osx/osx.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 63760b5f..a63f0ee0 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -174,12 +174,16 @@ function itunes() { next|previous) opt="$opt track" ;; + vol) + opt="set sound volume to $1" #$1 Due to the shift + ;; ""|-h|--help) echo "Usage: itunes