From 244533320062afd470e4aa6aab92e1532cf2fec3 Mon Sep 17 00:00:00 2001 From: Rimenes Ribeiro Date: Tue, 24 Sep 2013 15:20:52 -0300 Subject: [PATCH 01/28] 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 cdd142e92..c2dbef244 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 b2ea7d3ec12152ab4d864c27c33d8b9396c68858 Mon Sep 17 00:00:00 2001 From: Stanislav Schultz Date: Fri, 28 Mar 2014 20:25:13 +0300 Subject: [PATCH 02/28] 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 3bde154df..ad23e18d7 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 03/28] 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 c2e95884e..f9497aefb 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 3c485db8c73bfebf379f3e9382eb8f300b608bd8 Mon Sep 17 00:00:00 2001 From: r3dDoX Date: Sat, 24 May 2014 12:15:26 +0200 Subject: [PATCH 04/28] 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 305a77aff..3eca8a6c6 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 05/28] 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 3eca8a6c6..d6cee37c3 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 514693125b12d4b4cd099dcb09174f7bfd9a5b0e Mon Sep 17 00:00:00 2001 From: r3dDoX Date: Mon, 26 May 2014 10:47:51 +0200 Subject: [PATCH 06/28] 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 d6cee37c3..a52f82de0 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 b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1 Mon Sep 17 00:00:00 2001 From: Josh Datko Date: Tue, 27 May 2014 10:34:03 -0600 Subject: [PATCH 07/28] 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 63760b5ff..a63f0ee05 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