From 7eeb7d5ea7460a19ccefa7c892f7e40f820791a6 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Mon, 20 Dec 2010 12:19:59 -0300 Subject: [PATCH 1/4] 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 00000000..5c1930af --- /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 14628eef371a79df478973731ce49fc3eb45de36 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Mon, 20 Dec 2010 12:50:55 -0300 Subject: [PATCH 2/4] 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 5c1930af..20ba0408 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 5f0afcdd3cd8870954087c7c05dd40ae5ed0ef4e Mon Sep 17 00:00:00 2001 From: Derek Prior Date: Tue, 21 Dec 2010 14:28:40 -0500 Subject: [PATCH 3/4] 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 56d7a231..bb114f61 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 6f0001c579dbd464e31902bb44b05f69facdaefd Mon Sep 17 00:00:00 2001 From: "Suraj N. Kurapati" Date: Tue, 28 Dec 2010 20:36:29 -0800 Subject: [PATCH 4/4] 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 00000000..f22eda86 --- /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%}"