From 8edf417375fa8468008fbea78b7532125ea6bd83 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Mon, 20 Dec 2010 12:13:47 -0300 Subject: [PATCH 1/6] Aliased git checkout as `gco` --- plugins/git/git.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index d317d179d..09b1f16cc 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -8,6 +8,7 @@ alias gd='git diff | mate' alias gdv='git diff -w "$@" | vim -R -' alias gc='git commit -v' alias gca='git commit -v -a' +alias gco='git checkout' alias gb='git branch' alias gba='git branch -a' alias gcount='git shortlog -sn' From 960eb52366abe6e8951b8b20a9fb59ef6d50a3e8 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Mon, 20 Dec 2010 12:19:59 -0300 Subject: [PATCH 2/6] A rails3 plugin based on the rails plugin --- plugins/rails3/rails3.plugin.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugins/rails3/rails3.plugin.zsh diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh new file mode 100644 index 000000000..5c1930af3 --- /dev/null +++ b/plugins/rails3/rails3.plugin.zsh @@ -0,0 +1,12 @@ +alias rs='ruby script/rails server' +alias rg='ruby script/rails generate' +alias rd='ruby script/rails destroy' +alias rp='ruby script/rails plugin' +alias rdbm='rake db:migrate db:test:clone' +alias rc='ruby script/rails console' +alias rd='ruby script/rais server --debugger' +alias devlog='tail -f log/development.log' + +function remote_console() { + /usr/bin/env ssh $1 "( cd $2 && ruby script/rails console production )" +} From 6aa8ee2f515875e9a75b30b3a5734451f585a3f1 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Mon, 20 Dec 2010 12:50:55 -0300 Subject: [PATCH 3/6] Removed remote_console. It doesn't handle rvm, capistrano, and so on. --- plugins/rails3/rails3.plugin.zsh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh index 5c1930af3..20ba0408c 100644 --- a/plugins/rails3/rails3.plugin.zsh +++ b/plugins/rails3/rails3.plugin.zsh @@ -6,7 +6,3 @@ alias rdbm='rake db:migrate db:test:clone' alias rc='ruby script/rails console' alias rd='ruby script/rais server --debugger' alias devlog='tail -f log/development.log' - -function remote_console() { - /usr/bin/env ssh $1 "( cd $2 && ruby script/rails console production )" -} From 1a8ceef514bc86f882adce1834bfab168afcb4d1 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Mon, 20 Dec 2010 12:57:23 -0300 Subject: [PATCH 4/6] Typo --- plugins/git/git.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 09b1f16cc..71a62819b 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -27,7 +27,7 @@ function current_branch() { echo ${ref#refs/heads/} } -# these aliases take advangate of the previous function +# these aliases take advantage of the previous function alias ggpull='git pull origin $(current_branch)' alias ggpush='git push origin $(current_branch)' -alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' \ No newline at end of file +alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' From 2b03b95122361fa73e7651d1a06730ae95548a14 Mon Sep 17 00:00:00 2001 From: Derek Prior Date: Tue, 21 Dec 2010 14:28:40 -0500 Subject: [PATCH 5/6] Added function to mkdir and immediately change to it --- lib/directories.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/directories.zsh b/lib/directories.zsh index 56d7a2316..bb114f615 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -36,5 +36,9 @@ cd () { alias md='mkdir -p' alias rd=rmdir +alias d='dirs -v' -alias d='dirs -v' \ No newline at end of file +# mkdir & cd to it +function mcd() { + mkdir -p "$1" && cd "$1"; +} \ No newline at end of file From 943e09cd84baff55d36ebcfcf05b9fbfb4436a17 Mon Sep 17 00:00:00 2001 From: "Suraj N. Kurapati" Date: Tue, 28 Dec 2010 20:36:29 -0800 Subject: [PATCH 6/6] add "fishy" theme to emulate Fish shell's prompt --- themes/fishy.zsh-theme | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 themes/fishy.zsh-theme diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme new file mode 100644 index 000000000..f22eda868 --- /dev/null +++ b/themes/fishy.zsh-theme @@ -0,0 +1,9 @@ +# ZSH Theme emulating the Fish shell's default prompt. + +local user_color='green'; [ $UID -eq 0 ] && user_color='red' +PROMPT='%n@%m %{$fg[$user_color]%}%~%{$reset_color%}%(!.#.>) ' +PROMPT2='%{$fg[red]%}\ %{$reset_color%}' +RPS1='%(?..%{$fg[red]%}%? ↵%{$reset_color%})$(git_prompt_info)' + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"