From 2ecc228b2325bf5fadb5c12a5ffff73167e53152 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Wed, 16 Dec 2009 11:23:41 -0800 Subject: [PATCH 1/7] 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 2/7] 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 3/7] 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 4/7] 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 ' From 5149679f86d54658f8a292f6e220d4edef32769d Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Sat, 2 Jan 2010 02:12:46 -0300 Subject: [PATCH 5/7] added "clean" theme --- themes/clean.zsh-theme | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 themes/clean.zsh-theme diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme new file mode 100644 index 000000000..0ab0ac0de --- /dev/null +++ b/themes/clean.zsh-theme @@ -0,0 +1,12 @@ +PROMPT='%n:%{$fg[blue]%}%B%c%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' +RPROMPT='[%*]' + +# git theming +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}%B" +ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗" + +# LS colors, made with http://geoff.greer.fm/lscolors/ +export LSCOLORS="Gxfxcxdxbxegedabagacad" +export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' From 9658449450685d5adae867a0b79eddc47262f65e Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Sat, 2 Jan 2010 02:51:49 -0300 Subject: [PATCH 6/7] improvements to the 'clean' theme --- themes/clean.zsh-theme | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme index 0ab0ac0de..d81eeaa63 100644 --- a/themes/clean.zsh-theme +++ b/themes/clean.zsh-theme @@ -1,4 +1,6 @@ -PROMPT='%n:%{$fg[blue]%}%B%c%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' +if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="white"; fi + +PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' RPROMPT='[%*]' # git theming From be66fe9d7aab5cd1603a6e86d67b792ac9f5e6f5 Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Sat, 2 Jan 2010 17:59:11 -0300 Subject: [PATCH 7/7] clean theme: username is now bold --- themes/clean.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme index d81eeaa63..95f532a82 100644 --- a/themes/clean.zsh-theme +++ b/themes/clean.zsh-theme @@ -1,6 +1,6 @@ if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="white"; fi -PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' +PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' RPROMPT='[%*]' # git theming