From eddab5034cb19caa99a1a0e381de4dcf63ef0fe0 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 1 Oct 2009 08:55:07 +0100 Subject: [PATCH 01/12] run update check *after* running custom configuration scripts. This means we are running it after $PATH has potentially been set up, which means it's more likely that commands like "git" will be found --- lib/misc.zsh | 8 -------- oh-my-zsh.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index 8d672725..a01627d9 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -7,11 +7,3 @@ bindkey "^[m" copy-prev-shell-word ## jobs setopt long_list_jobs - -# Check for updates on initial load... -if [ "$DISABLE_AUTO_UPDATE" = "true" ] -then - return -else - /bin/sh $ZSH/tools/check_for_upgrade.sh -fi diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 6e73519b..4b595962 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -6,3 +6,11 @@ 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 + +# Check for updates on initial load... +if [ "$DISABLE_AUTO_UPDATE" = "true" ] +then + return +else + /bin/sh $ZSH/tools/check_for_upgrade.sh +fi From 172bb418304eb4c513f8ae43dd72ff201a046b38 Mon Sep 17 00:00:00 2001 From: Markus Prinz Date: Sat, 3 Oct 2009 19:34:49 +0200 Subject: [PATCH 02/12] Add my (cypher's) zsh prompt Based on Evan's prompt, it uses colors, shows the exit status of the last command if it was non-zero, and displays "#" when running with elevated privileges --- themes/cypher.zsh-theme | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 themes/cypher.zsh-theme diff --git a/themes/cypher.zsh-theme b/themes/cypher.zsh-theme new file mode 100644 index 00000000..36633da2 --- /dev/null +++ b/themes/cypher.zsh-theme @@ -0,0 +1,4 @@ +# Based on evan's prompt +# Shows the exit status of the last command if non-zero +# Uses "#" instead of "»" when running with elevated privileges +PROMPT="%m %B%F{red}::%b %B%F{green}%3~%(0?. . %F{red}%? )%F{red}%(0!.#.»)%b%F{white} " From 60e99779d5658841026acb84483a7deeb6851246 Mon Sep 17 00:00:00 2001 From: Markus Prinz Date: Sat, 3 Oct 2009 19:48:29 +0200 Subject: [PATCH 03/12] Make "-" an alias for "cd -" (cd back to previous directory) --- lib/aliases.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index cd17781a..6f6c614f 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -8,6 +8,7 @@ alias ss='thin --stats "/thin/stats" start' alias mr='mate CHANGELOG app config db lib public script spec test' alias .='pwd' alias ...='cd ../..' +alias -- -='cd -' alias _='sudo' alias ss='sudo su -' From 8a8343b0de31f3adcd366fc0b9c113ee009287f0 Mon Sep 17 00:00:00 2001 From: xiongchiamiov Date: Mon, 5 Oct 2009 19:23:12 -0700 Subject: [PATCH 04/12] add xiong-chiamiov theme --- themes/xiong-chiamiov.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/xiong-chiamiov.zsh-theme diff --git a/themes/xiong-chiamiov.zsh-theme b/themes/xiong-chiamiov.zsh-theme new file mode 100644 index 00000000..7c4c2e4f --- /dev/null +++ b/themes/xiong-chiamiov.zsh-theme @@ -0,0 +1,6 @@ +# user, host, full path, and time/date +# on two lines for easier vgrepping +# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} +%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b ' +PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' From 9890bbb24d23e82bbc8f8fea9ffe423fc3eda12a Mon Sep 17 00:00:00 2001 From: Markus Prinz Date: Tue, 6 Oct 2009 23:19:43 +0200 Subject: [PATCH 05/12] Fix cypher's theme for older zsh versions --- themes/cypher.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/cypher.zsh-theme b/themes/cypher.zsh-theme index 36633da2..45df53d2 100644 --- a/themes/cypher.zsh-theme +++ b/themes/cypher.zsh-theme @@ -1,4 +1,4 @@ # Based on evan's prompt # Shows the exit status of the last command if non-zero # Uses "#" instead of "»" when running with elevated privileges -PROMPT="%m %B%F{red}::%b %B%F{green}%3~%(0?. . %F{red}%? )%F{red}%(0!.#.»)%b%F{white} " +PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . ${fg[red]}%? )%{${fg[blue]}%}»%{${reset_color}%} " From 069e9b8752ddaa85b0e21b8033f0c2075ac42f11 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Thu, 8 Oct 2009 09:50:32 +1100 Subject: [PATCH 06/12] Add my own theme --- themes/wezm.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/wezm.zsh-theme diff --git a/themes/wezm.zsh-theme b/themes/wezm.zsh-theme new file mode 100644 index 00000000..1881343b --- /dev/null +++ b/themes/wezm.zsh-theme @@ -0,0 +1,7 @@ +PROMPT='$(git_prompt_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} ' +RPROMPT='%{$fg[green]%}%~%{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[red]%}⚡%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" From fafa15676a8f398c95b909f719b07349df2c7d5b Mon Sep 17 00:00:00 2001 From: Gerhard Lazu Date: Sun, 11 Oct 2009 09:50:08 +0100 Subject: [PATCH 07/12] Replaced source with . --- 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 feb999af..5c212b6f 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -4,7 +4,7 @@ current_epoch=$(($(date +%s) / 60 / 60 / 24)) if [ -f ~/.zsh-update ] then - source ~/.zsh-update + . ~/.zsh-update epoch_diff=$(($current_epoch - $LAST_EPOCH)) if [ $epoch_diff -gt 6 ] then From 7705ffaf0c38438b0e007f75553876cf5ae99803 Mon Sep 17 00:00:00 2001 From: Gerhard Lazu Date: Sun, 11 Oct 2009 09:56:22 +0100 Subject: [PATCH 08/12] Added git diff for vim (gdv) --- lib/aliases.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 6f6c614f..c4388feb 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -20,6 +20,7 @@ alias gst='git status' alias gl='git pull' alias gp='git push' alias gd='git diff | mate' +alias gdv='git diff -w "$@" | vim -R -' alias gc='git commit -v' alias gca='git commit -v -a' alias gb='git branch' From fdac2b3f04f7b2c42bab7c7f6b53d8c8d32b62a5 Mon Sep 17 00:00:00 2001 From: Gerhard Lazu Date: Sun, 11 Oct 2009 14:49:24 +0100 Subject: [PATCH 09/12] Added ack-grep searching --- lib/aliases.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index c4388feb..5f3582bd 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -37,6 +37,7 @@ alias sl=ls # often screw this up alias sgem='sudo gem' alias rfind='find . -name *.rb | xargs grep -n' +alias afind='ack-grep -il' alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' From 788c9af05684f4b9e39e7f15de2c06c4c8291cbd Mon Sep 17 00:00:00 2001 From: Gerhard Lazu Date: Sun, 11 Oct 2009 15:09:10 +0100 Subject: [PATCH 10/12] Added more aliases for Rails & git --- lib/aliases.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 5f3582bd..273bcc67 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -2,8 +2,14 @@ alias pu='pushd' alias po='popd' alias sc='ruby script/console' +alias sdb='ruby script/dbconsole' alias sd='ruby script/server --debugger' alias ss='thin --stats "/thin/stats" start' +alias sg='ruby script/generate' +alias sd='ruby script/destroy' +alias sp='ruby script/plugin' +alias ssp='ruby script/spec' +alias rdbm='rake db:migrate' alias mr='mate CHANGELOG app config db lib public script spec test' alias .='pwd' @@ -18,6 +24,7 @@ alias ss='sudo su -' alias g='git' alias gst='git status' alias gl='git pull' +alias gup='git fetch && git rebase' alias gp='git push' alias gd='git diff | mate' alias gdv='git diff -w "$@" | vim -R -' @@ -25,6 +32,8 @@ alias gc='git commit -v' alias gca='git commit -v -a' alias gb='git branch' alias gba='git branch -a' +alias gdb='git branch -d' +alias gcount='git shortlog -sn' alias history='fc -l 1' From b6c8ef41b1b8ed129f473377d4b8d549fa93b5b9 Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 13 Oct 2009 12:34:53 +1100 Subject: [PATCH 11/12] added gcp alias (git cherry-pick) --- lib/aliases.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 273bcc67..f7d62214 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -34,6 +34,7 @@ alias gb='git branch' alias gba='git branch -a' alias gdb='git branch -d' alias gcount='git shortlog -sn' +alias gcp='git cherry-pick' alias history='fc -l 1' From c03aab51645fa7448f4e92b09ab00e2de989010e Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Mon, 12 Oct 2009 19:13:52 -0700 Subject: [PATCH 12/12] Renaming script/server --debug alias to ssd to avoid conflict. Closes #1 --- lib/aliases.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index f7d62214..304bafd2 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -3,7 +3,7 @@ alias po='popd' alias sc='ruby script/console' alias sdb='ruby script/dbconsole' -alias sd='ruby script/server --debugger' +alias ssd='ruby script/server --debugger' alias ss='thin --stats "/thin/stats" start' alias sg='ruby script/generate' alias sd='ruby script/destroy'