From da3be21b4f9dc510e6d6c91a58f3e1abb566369b Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 13:58:53 +0100 Subject: [PATCH 01/16] Add in my normal s{s,d} aliases --- aliases.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aliases.zsh b/aliases.zsh index 5cf253dc5..4c079c1e5 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -2,7 +2,8 @@ alias pu='pushd' alias po='popd' alias sc='ruby script/console' -alias ss='ruby script/server' +alias sd='ruby script/server --debugger' +alias ss='thin --stats "/thin/stats" start' alias mr='mate CHANGELOG app config db lib public script spec test' alias .='pwd' From 7a7b0bc7f57ffabaa8e409975be4efe83e6eb924 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 13:59:16 +0100 Subject: [PATCH 02/16] Add textmate aliases --- aliases.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aliases.zsh b/aliases.zsh index 4c079c1e5..cabeca60e 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -27,4 +27,9 @@ alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' bindkey '\ew' kill-region bindkey -s '\el' "ls\n" -bindkey -s '\e.' "..\n" \ No newline at end of file +bindkey -s '\e.' "..\n" + +alias et='mate . &' +alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' +alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' +alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' From 0f2e63f8995bfaf35b2cfc149866c3be503d3820 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 13:59:34 +0100 Subject: [PATCH 03/16] Swap out g alias to git --- aliases.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aliases.zsh b/aliases.zsh index cabeca60e..9bbeb0682 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -11,7 +11,8 @@ alias ...='cd ../..' alias _='sudo' -alias g='grep -in' +#alias g='grep -in' +alias g='git' alias history='fc -l 1' From 5811a6b11f86a2807ebd57697eaa67947276b61d Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 14:01:39 +0100 Subject: [PATCH 04/16] Strip colours from git.zsh --- git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.zsh b/git.zsh index b9a86173f..7f5714f74 100644 --- a/git.zsh +++ b/git.zsh @@ -4,7 +4,7 @@ function git_prompt_info() { branch=${ref#refs/heads/} if [[ -d .git ]]; then - CURRENT_BRANCH="%{$fg[red]%}git:(%{$fg[green]${branch}%{$fg[red])" + CURRENT_BRANCH="(${branch})" else CURRENT_BRANCH='' fi From 45f05b9bbc84f0ac934bb137a9ff3a01f7710c5d Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 14:02:19 +0100 Subject: [PATCH 05/16] Use my normal PATH instead of included --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 46f0b1b51..d5c00d6df 100644 --- a/zshrc +++ b/zshrc @@ -6,6 +6,6 @@ export ZSH=$HOME/.oh-my-zsh for i in $ZSH/*zsh; do source $i; done; # Customize to your needs... -export PATH=~/bin:/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/sbin:/opt/local/lib/postgresql83/bin - +#export PATH=~/bin:/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/sbin:/opt/local/lib/postgresql83/bin +export PATH=$PATH:$HOME/bin From a92158eab3dfce4c7010e600d88dcdcd2fbb8dcb Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 14:03:33 +0100 Subject: [PATCH 06/16] Customise prompt value --- prompt.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prompt.zsh b/prompt.zsh index 09481ded9..d191af7f5 100644 --- a/prompt.zsh +++ b/prompt.zsh @@ -29,4 +29,5 @@ setopt prompt_subst export LSCOLORS="Gxfxcxdxbxegedabagacad" -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +# PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%m:%1/$(git_prompt_info) %n\$ ' From 3ab0d639d0f6feaf6612badd932542d206fc5450 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 14:03:56 +0100 Subject: [PATCH 07/16] Add tab, take and tm functions --- functions.zsh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/functions.zsh b/functions.zsh index dcabed957..0dcfbd39a 100644 --- a/functions.zsh +++ b/functions.zsh @@ -22,4 +22,26 @@ function preexec { function remote_console() { /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" -} \ No newline at end of file +} + +function tab() { + osascript 2>/dev/null < Date: Mon, 31 Aug 2009 18:46:48 +0100 Subject: [PATCH 08/16] Add geoffgarside theme --- themes/geoffgarside.zsh-theme | 1 + zshrc | 1 + 2 files changed, 2 insertions(+) create mode 100644 themes/geoffgarside.zsh-theme diff --git a/themes/geoffgarside.zsh-theme b/themes/geoffgarside.zsh-theme new file mode 100644 index 000000000..861ef9196 --- /dev/null +++ b/themes/geoffgarside.zsh-theme @@ -0,0 +1 @@ +PROMPT='%m:%1/$(git_prompt_info) %n\$ ' diff --git a/zshrc b/zshrc index 2e2a33d9b..c92becf92 100644 --- a/zshrc +++ b/zshrc @@ -4,6 +4,7 @@ export ZSH=$HOME/.oh-my-zsh # Set to the name theme to load. # Look in ~/.oh-my-zsh/themes/ export ZSH_THEME="robbyrussell" +export ZSH_THEME="geoffgarside" # Load all of the config files in ~/oh-my-zsh that end in .zsh # TIP: Add files you don't want in git to .gitignore From df8ad95c6adfc91332e951f21d9a44c8612b0f04 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 18:49:48 +0100 Subject: [PATCH 09/16] Remove PATH definition as we define this in .profile --- zshrc | 1 - 1 file changed, 1 deletion(-) diff --git a/zshrc b/zshrc index c92becf92..fb023885f 100644 --- a/zshrc +++ b/zshrc @@ -12,5 +12,4 @@ for i in $ZSH/*zsh; do source $i; done; # Customize to your needs... #export PATH=~/bin:/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/sbin:/opt/local/lib/postgresql83/bin -export PATH=$PATH:$HOME/bin From 841cca16a6b355f707585b96f75194381f49590f Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 21:12:58 +0100 Subject: [PATCH 10/16] Remove colour from ls command --- aliases.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aliases.zsh b/aliases.zsh index 9bbeb0682..e27cd0366 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -16,7 +16,7 @@ alias g='git' alias history='fc -l 1' -alias ls='ls -GF' +alias ls='ls -F' alias ll='ls -al' alias sgem='sudo gem' @@ -34,3 +34,6 @@ alias et='mate . &' alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' + +bindkey "^[[A" history-beginning-search-backward +bindkey "^[[B" history-beginning-search-forward From a9c18304621b045d90a2fc328da79f29a2de6b42 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 21:23:35 +0100 Subject: [PATCH 11/16] Change dirty git string to a yello X --- git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.zsh b/git.zsh index 7f5714f74..85279265e 100644 --- a/git.zsh +++ b/git.zsh @@ -13,5 +13,5 @@ function git_prompt_info() { } parse_git_dirty () { - [[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "%{$fg[white] ♻ " + [[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "%{$fg[yellow]%}✗%{$reset_color%}" } From 652caa6b2591e773179b8e38992d516db1f99930 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 21:23:59 +0100 Subject: [PATCH 12/16] Colour branch name and add dirty string --- git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.zsh b/git.zsh index 85279265e..805969b71 100644 --- a/git.zsh +++ b/git.zsh @@ -4,7 +4,7 @@ function git_prompt_info() { branch=${ref#refs/heads/} if [[ -d .git ]]; then - CURRENT_BRANCH="(${branch})" + CURRENT_BRANCH="(%{$fg[red]%}${branch}%{$reset_color%}) $(parse_git_dirty) " else CURRENT_BRANCH='' fi From 076f9b15fff84f58009f73f19292729015d1c888 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 21:25:12 +0100 Subject: [PATCH 13/16] Add my own theme --- themes/geoffgarside.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/geoffgarside.zsh-theme b/themes/geoffgarside.zsh-theme index 861ef9196..022e44abe 100644 --- a/themes/geoffgarside.zsh-theme +++ b/themes/geoffgarside.zsh-theme @@ -1 +1,2 @@ -PROMPT='%m:%1/$(git_prompt_info) %n\$ ' +# PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) " +PROMPT="[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%} $(git_prompt_info)%(!.#.$) " From 5ace61de4e9d10b3257f9565f246abd28082592c Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 21:49:24 +0100 Subject: [PATCH 14/16] Switch double quotes for singles, fixes prompt issues --- themes/geoffgarside.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/geoffgarside.zsh-theme b/themes/geoffgarside.zsh-theme index 022e44abe..5c37ffc3e 100644 --- a/themes/geoffgarside.zsh-theme +++ b/themes/geoffgarside.zsh-theme @@ -1,2 +1,2 @@ # PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) " -PROMPT="[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%} $(git_prompt_info)%(!.#.$) " +PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%} $(git_prompt_info)%(!.#.$) ' From 845eabc8cc86ebfcab7a9ebca5eb87aa136e9ce3 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 21:51:11 +0100 Subject: [PATCH 15/16] Restructure spaces in git pieces --- git.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git.zsh b/git.zsh index 805969b71..a8e2e36aa 100644 --- a/git.zsh +++ b/git.zsh @@ -4,7 +4,7 @@ function git_prompt_info() { branch=${ref#refs/heads/} if [[ -d .git ]]; then - CURRENT_BRANCH="(%{$fg[red]%}${branch}%{$reset_color%}) $(parse_git_dirty) " + CURRENT_BRANCH="(%{$fg[red]%}${branch}%{$reset_color%})$(parse_git_dirty) " else CURRENT_BRANCH='' fi @@ -13,5 +13,5 @@ function git_prompt_info() { } parse_git_dirty () { - [[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "%{$fg[yellow]%}✗%{$reset_color%}" + [[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]] && echo " %{$fg[yellow]%}✗%{$reset_color%}" } From af8294d2068e3614a7635486de1d89e12e23a8e5 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Mon, 31 Aug 2009 22:24:03 +0100 Subject: [PATCH 16/16] Move the spaces around again :P --- git.zsh | 2 +- themes/geoffgarside.zsh-theme | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git.zsh b/git.zsh index a8e2e36aa..1b458762d 100644 --- a/git.zsh +++ b/git.zsh @@ -4,7 +4,7 @@ function git_prompt_info() { branch=${ref#refs/heads/} if [[ -d .git ]]; then - CURRENT_BRANCH="(%{$fg[red]%}${branch}%{$reset_color%})$(parse_git_dirty) " + CURRENT_BRANCH="(%{$fg[red]%}${branch}%{$reset_color%})$(parse_git_dirty)" else CURRENT_BRANCH='' fi diff --git a/themes/geoffgarside.zsh-theme b/themes/geoffgarside.zsh-theme index 5c37ffc3e..38733d95c 100644 --- a/themes/geoffgarside.zsh-theme +++ b/themes/geoffgarside.zsh-theme @@ -1,2 +1,2 @@ # PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) " -PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%} $(git_prompt_info)%(!.#.$) ' +PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) '