From 93cfed0e111897ae5e26df4fa3187dd21e576daf 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 5cf253d..4c079c1 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 0196e5ed6d75a3c740902642fb64ac30621885d4 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 4c079c1..cabeca6 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 1f82cfc85a3a68435846f8ec13094be267d8bff8 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 cabeca6..9bbeb06 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 be966214c9be7fbcc3083f7be3094b87bf2acf70 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 b9a8617..7f5714f 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 4e3f4d5e9fc3c7ea04fa507729c7d83acc1e372e 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 46f0b1b..d5c00d6 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 b2f26ab8545197e929538539acbedba999e11ff7 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 09481de..d191af7 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 0678055f66faaeebfabcfe58aeb67059410df790 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 dcabed9..0dcfbd3 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 0000000..861ef91 --- /dev/null +++ b/themes/geoffgarside.zsh-theme @@ -0,0 +1 @@ +PROMPT='%m:%1/$(git_prompt_info) %n\$ ' diff --git a/zshrc b/zshrc index 2e2a33d..c92becf 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 3d3dbaf5dbd42e60a04293d80d89c320fec8ba14 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 c92becf..fb02388 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 7b844f8aa3540e2b75d2e7114475331415d59f67 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 9bbeb06..e27cd03 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 5f039558a326030b637b59c0b59bd35a8d0bded2 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 7f5714f..8527926 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 fee63f0db8823e90df66d3e1f363a2182d017727 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 8527926..805969b 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 f1e17335b83bfd7f296ff453c735170f757b6188 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 861ef91..022e44a 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 5e975f6286fcc1c15129efd45f1c501f414fa270 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 022e44a..5c37ffc 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 5d51e6e1ef5fbdbece667c252edb2328a880fa55 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 805969b..a8e2e36 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 a165a6a078cbf9b045d9fd1c81265034adce8a69 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 a8e2e36..1b45876 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 5c37ffc..38733d9 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) %(!.#.$) '