From 7aca512f32aaa9eff78d9c2bd73e3db4b124661f Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 13 Nov 2009 22:02:42 +0100 Subject: [PATCH 01/17] Theme tonotdo upgrade --- themes/tonotdo.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index 478f01de7..f46d165da 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,8 +1,8 @@ -PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[yellow]%}•%{$fg_no_bold[magenta]%}%3~$(git_prompt_info)%{$reset_color%}» ' +PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[yellow]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' RPROMPT='[%*]' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[green]%}" +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[magenta]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}⚡%{$fg_bold[blue]%})" From 5bd19908919f9de691797a5a4589ac49bf6ed356 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 13 Nov 2009 23:39:07 +0100 Subject: [PATCH 02/17] tonotdo theme like I like it --- themes/tonotdo.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index f46d165da..70f224ee0 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,8 +1,8 @@ -PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[yellow]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' +PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' RPROMPT='[%*]' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[magenta]%}" +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}⚡%{$fg_bold[blue]%})" From 6524bee2ce5996bdb03e9efff174b16028beca68 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 13 Nov 2009 23:44:28 +0100 Subject: [PATCH 03/17] tonotdo theme still not like I wanted --- themes/tonotdo.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index 70f224ee0..2a171a79c 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -2,10 +2,10 @@ PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%} RPROMPT='[%*]' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}" +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}⚡%{$fg_bold[blue]%})" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}⚡%{$fg_bold[blue]%})" # LS colors, made with http://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" From 3f49658cb53c589808e7fac47f4a6837c503292d Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 13 Nov 2009 23:55:37 +0100 Subject: [PATCH 04/17] tonotdo theme: Back to the original --- themes/tonotdo.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index 2a171a79c..a6407034c 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -1,11 +1,11 @@ -PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' +PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}➜%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' RPROMPT='[%*]' # git theming ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}⚡%{$fg_bold[blue]%})" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})" # LS colors, made with http://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" From dca4651cee556ccdbfe678e695bf9523cc1fc11d Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Mon, 30 Nov 2009 23:28:40 +0100 Subject: [PATCH 05/17] Completion from history --- lib/completion.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index c231ee21e..9fe351b33 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -43,7 +43,7 @@ if [ -f ~/.ssh/known_hosts ]; then fi # Complete on history -# zstyle ':completion:*:history-words' stop yes -# zstyle ':completion:*:history-words' remove-all-dups yes -# zstyle ':completion:*:history-words' list false -# zstyle ':completion:*:history-words' menu yes +zstyle ':completion:*:history-words' stop yes +zstyle ':completion:*:history-words' remove-all-dups yes +zstyle ':completion:*:history-words' list false +zstyle ':completion:*:history-words' menu yes From 065ae00673f69c792a5778e19590ed50c99e8a04 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Tue, 1 Dec 2009 23:06:15 +0100 Subject: [PATCH 06/17] Revert --- lib/completion.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 9fe351b33..46b6d8f65 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -43,7 +43,7 @@ if [ -f ~/.ssh/known_hosts ]; then fi # Complete on history -zstyle ':completion:*:history-words' stop yes -zstyle ':completion:*:history-words' remove-all-dups yes -zstyle ':completion:*:history-words' list false -zstyle ':completion:*:history-words' menu yes +#zstyle ':completion:*:history-words' stop yes +#zstyle ':completion:*:history-words' remove-all-dups yes +#zstyle ':completion:*:history-words' list false +#zstyle ':completion:*:history-words' menu yes From dfb3fb5a0a7566d6576d6fb964ff1a29eacbfef4 Mon Sep 17 00:00:00 2001 From: To1ne Date: Thu, 10 Dec 2009 19:04:06 +0100 Subject: [PATCH 07/17] No correction on mkdir + removed duplicate nocorrect mv --- lib/correction.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/correction.zsh b/lib/correction.zsh index c9fecb0fe..9d5036933 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -3,4 +3,4 @@ setopt correct_all alias man='nocorrect man' alias mv='nocorrect mv' alias mysql='nocorrect mysql' -alias mv='nocorrect mv' +alias mkdir='nocorrect mkdir' \ No newline at end of file From bee94dbd6276d53aae56938920466faf15d2495b Mon Sep 17 00:00:00 2001 From: macovsky Date: Sat, 12 Dec 2009 12:06:46 +0300 Subject: [PATCH 08/17] new theme --- themes/macovsky.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/macovsky.zsh-theme diff --git a/themes/macovsky.zsh-theme b/themes/macovsky.zsh-theme new file mode 100644 index 000000000..db7f9148c --- /dev/null +++ b/themes/macovsky.zsh-theme @@ -0,0 +1,8 @@ +# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +PROMPT='%{$fg[green]%}%~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' +RPS1="${return_code}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" +ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" \ No newline at end of file From e429ff9e2bed41f88e3df3315b159fa79a7152fc Mon Sep 17 00:00:00 2001 From: To1ne Date: Sat, 12 Dec 2009 10:12:14 +0100 Subject: [PATCH 09/17] no correction on gist --- lib/correction.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/correction.zsh b/lib/correction.zsh index 9d5036933..62d46da19 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -3,4 +3,5 @@ setopt correct_all alias man='nocorrect man' alias mv='nocorrect mv' alias mysql='nocorrect mysql' -alias mkdir='nocorrect mkdir' \ No newline at end of file +alias mkdir='nocorrect mkdir' +alias gist='nocorrect gist' \ No newline at end of file From 41f13ccb0a5d04496605f69b7ae284d9d639b625 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Sat, 12 Dec 2009 13:45:30 -0800 Subject: [PATCH 10/17] Updating check_for_upgrade script to fix issue when the LAST_EPOCH file/value got corrupted. Closes #32 --- tools/check_for_upgrade.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 5c212b6fa..c59ebaed4 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -1,11 +1,22 @@ #!/bin/sh -current_epoch=$(($(date +%s) / 60 / 60 / 24)) +function _current_epoch() { + echo $(($(date +%s) / 60 / 60 / 24)) +} + +function _update_zsh_update() { + echo "LAST_EPOCH=$(_current_epoch)" > ~/.zsh-update +} if [ -f ~/.zsh-update ] then . ~/.zsh-update - epoch_diff=$(($current_epoch - $LAST_EPOCH)) + + if [[ -z "$LAST_EPOCH" ]]; then + _update_zsh_update && return 0; + fi + + epoch_diff=$((${_current_epoch} - $LAST_EPOCH)) if [ $epoch_diff -gt 6 ] then echo "[Oh My Zsh] Would you like to check for updates?" @@ -15,14 +26,9 @@ then then /bin/sh $ZSH/tools/upgrade.sh fi - - # Set the last epoch to the current so that we don't ask for another week - echo "LAST_EPOCH=${current_epoch}" > ~/.zsh-update fi -else - # TODO: refactor this so remove duplicates - # Create the ~/.zsh-update file with the current epoch info - echo "LAST_EPOCH=${current_epoch}" > ~/.zsh-update fi +# update the zsh file +_update_zsh_update From 59116a25f1b071a691a7df2abf2f41d0ed2a2798 Mon Sep 17 00:00:00 2001 From: johnmaxwelliv Date: Sat, 12 Dec 2009 21:23:36 -0700 Subject: [PATCH 11/17] Instead of using the user's standard shell, this script should be run using zsh, since that was the shell it was written for. On my machine changes to my default shell only take effect when I log out and then long in again. Plus, it's nice for people to be able to try oh-my-zsh out even if zsh isn't their default shell right? :-) --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index eadf02d00..d31e059f0 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -15,5 +15,5 @@ if [ "$DISABLE_AUTO_UPDATE" = "true" ] then return else - /bin/sh $ZSH/tools/check_for_upgrade.sh + /bin/zsh $ZSH/tools/check_for_upgrade.sh fi From 20755df49e28b97e0ad4ba8eef16aef476e9f61a Mon Sep 17 00:00:00 2001 From: johnmaxwelliv Date: Sun, 13 Dec 2009 12:38:37 -0700 Subject: [PATCH 12/17] Based on a suggestion from robbyrussel, using env for greater compatibility. --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index d31e059f0..fa2738e18 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -15,5 +15,5 @@ if [ "$DISABLE_AUTO_UPDATE" = "true" ] then return else - /bin/zsh $ZSH/tools/check_for_upgrade.sh + /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh fi From 98d56a3097237f4220d0f8833555ed37382281ee Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Sun, 13 Dec 2009 11:48:03 -0800 Subject: [PATCH 13/17] Adding a nocorrect for the heroku command as it was getting triggered by heroku logs. --- lib/correction.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/correction.zsh b/lib/correction.zsh index 62d46da19..a96f7ffd8 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -4,4 +4,5 @@ alias man='nocorrect man' alias mv='nocorrect mv' alias mysql='nocorrect mysql' alias mkdir='nocorrect mkdir' -alias gist='nocorrect gist' \ No newline at end of file +alias gist='nocorrect gist' +alias heroku='nocorrect heroku' From 2ecc228b2325bf5fadb5c12a5ffff73167e53152 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Wed, 16 Dec 2009 11:23:41 -0800 Subject: [PATCH 14/17] Adding a function that will open up a ticket in Lighthouse based on the number and there being a URL in a hidden file. --- lib/functions.zsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/functions.zsh b/lib/functions.zsh index 2fb096dd6..f95a59827 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -58,3 +58,20 @@ function tm() { cd $1 mate $1 } + +# To use: add a .lighthouse file into your directory with the URL to the +# individual project. For example: +# https://rails.lighthouseapp.com/projects/8994 +# Example usage: http://screencast.com/t/ZDgwNDUwNT +open_lighthouse_ticket () { + if [ ! -f .lighthouse-url ]; then + echo "There is no .lighthouse file in the current directory..." + return 0; + else + lighthouse_url=$(cat .lighthouse-url); + echo "Opening ticket #$1"; + `open $lighthouse_url/tickets/$1`; + fi +} + +alias lho='open_lighthouse_ticket' From 90627d3d1c2e9c1528b1032b47732e21270609b9 Mon Sep 17 00:00:00 2001 From: Dale Campbell Date: Sat, 26 Dec 2009 00:41:37 -0600 Subject: [PATCH 15/17] adding quotes to tab() --- lib/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index f95a59827..74b93f00e 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -44,7 +44,7 @@ function tab() { end tell application "Terminal" activate - do script with command "cd $PWD; $*" in window 1 + do script with command "cd \"$PWD\"; $*" in window 1 end tell EOF } From f9509f365b633ea5f07de2de2a34abe52304d42c Mon Sep 17 00:00:00 2001 From: Martin Klepsch Date: Sat, 19 Dec 2009 14:35:57 +0100 Subject: [PATCH 16/17] Putting Git related aliases into git.zsh to have them in context. --- lib/aliases.zsh | 17 +---------------- lib/git.zsh | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index d3ee2dd8c..f97daf41a 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -25,21 +25,6 @@ alias ss='sudo su -' #alias g='grep -in' -# Git related -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 -' -alias gc='git commit -v' -alias gca='git commit -v -a' -alias gb='git branch' -alias gba='git branch -a' -alias gcount='git shortlog -sn' -alias gcp='git cherry-pick' - # Show history alias history='fc -l 1' @@ -65,4 +50,4 @@ alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Ra alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' # Editor Ruby file in TextMate -alias mr='mate CHANGELOG app config db lib public script spec test' \ No newline at end of file +alias mr='mate CHANGELOG app config db lib public script spec test' diff --git a/lib/git.zsh b/lib/git.zsh index 52c7969f3..629a08b0e 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -20,3 +20,18 @@ function current_branch() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return echo ${ref#refs/heads/} } + +# Aliases +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 -' +alias gc='git commit -v' +alias gca='git commit -v -a' +alias gb='git branch' +alias gba='git branch -a' +alias gcount='git shortlog -sn' +alias gcp='git cherry-pick' From 7e6eaff7d39cb73d9af31e2b58f04aa984e1bda8 Mon Sep 17 00:00:00 2001 From: Ryan Wilcox Date: Sun, 13 Dec 2009 17:39:40 -0500 Subject: [PATCH 17/17] fork xiong-chiamiov theme for git support --- themes/xiong-chiamiov-plus.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/xiong-chiamiov-plus.zsh-theme diff --git a/themes/xiong-chiamiov-plus.zsh-theme b/themes/xiong-chiamiov-plus.zsh-theme new file mode 100644 index 000000000..095dae290 --- /dev/null +++ b/themes/xiong-chiamiov-plus.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] <$(git_prompt_info)>%{\e[0m%}%b ' +PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '