From 8fb119d55d0e0bfa4ee9fee72f3cc1674ecd9944 Mon Sep 17 00:00:00 2001 From: Shuky Dvir Date: Mon, 6 Feb 2012 11:21:30 +0200 Subject: [PATCH 1/3] shuky dvir theme --- themes/shukydvir.zsh-theme | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 themes/shukydvir.zsh-theme diff --git a/themes/shukydvir.zsh-theme b/themes/shukydvir.zsh-theme new file mode 100644 index 000000000..01490ca8f --- /dev/null +++ b/themes/shukydvir.zsh-theme @@ -0,0 +1,23 @@ +#RVM settings +if [[ -s ~/.rvm/scripts/rvm ]] ; then + RPS1="%{$reset_color%}%{$fg[yellow]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1" +else + if which rbenv &> /dev/null; then + RPS1="%{$reset_color%}%{$fg[yellow]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$reset_color%} $EPS1" + fi +fi + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[blue]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[cyan]%}√" + +#Customized git status, oh-my-zsh currently does not allow render dirty status before branch +git_custom_status() { + local cb=$(current_branch) + if [ -n "$cb" ]; then + echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX$(parse_git_dirty)" + fi +} + +PROMPT='%{$fg[green]%}[%~% ]$(git_custom_status)%{$reset_color%}%B$%b ' From 602729755e52aee7d348e7630a9671cf53c90855 Mon Sep 17 00:00:00 2001 From: Shuky Dvir Date: Mon, 20 Feb 2012 14:30:50 +0200 Subject: [PATCH 2/3] adding cutom plugin --- .gitignore | 1 - custom/plugins/shukyf/shukyf.plugin.zsh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 custom/plugins/shukyf/shukyf.plugin.zsh diff --git a/.gitignore b/.gitignore index 2e8db7341..666bfb0aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ locals.zsh log/.zsh_history projects.zsh -custom/* !custom/example !custom/example.zsh cache diff --git a/custom/plugins/shukyf/shukyf.plugin.zsh b/custom/plugins/shukyf/shukyf.plugin.zsh new file mode 100644 index 000000000..7f3dc9a59 --- /dev/null +++ b/custom/plugins/shukyf/shukyf.plugin.zsh @@ -0,0 +1,12 @@ +c() { cd ~/code/$1; } + +_c() { _files -W ~/code -/; } +compdef _c c + + + + +b() { cd ~/code/biokm/$1; } + +_b() { _files -W ~/code/biokm -/; } +compdef _b b \ No newline at end of file From 4e9da6c1679fd09ecea87b49ff26ea480cc7504b Mon Sep 17 00:00:00 2001 From: Shuky Dvir Date: Fri, 8 Jun 2012 16:11:28 +0300 Subject: [PATCH 3/3] adding more plugin --- custom/plugins/shukyf/shukyf.plugin.zsh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/custom/plugins/shukyf/shukyf.plugin.zsh b/custom/plugins/shukyf/shukyf.plugin.zsh index 7f3dc9a59..ebef63105 100644 --- a/custom/plugins/shukyf/shukyf.plugin.zsh +++ b/custom/plugins/shukyf/shukyf.plugin.zsh @@ -9,4 +9,16 @@ compdef _c c b() { cd ~/code/biokm/$1; } _b() { _files -W ~/code/biokm -/; } -compdef _b b \ No newline at end of file +compdef _b b + + + + +p() { cd ~/private_projects/$1; } + +_p() { _files -W ~/private_projects -/; } +compdef _p p + + +alias gmf='git merge --no-ff' +compdef _git gmf=git-merge--no-ff \ No newline at end of file