diff --git a/.gitignore b/.gitignore index 51a5ee6c3..4cb1720e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ locals.zsh log/.zsh_history projects.zsh -custom/* !custom/example !custom/example.zsh *.swp diff --git a/custom/plugins/shukyf/shukyf.plugin.zsh b/custom/plugins/shukyf/shukyf.plugin.zsh new file mode 100644 index 000000000..ebef63105 --- /dev/null +++ b/custom/plugins/shukyf/shukyf.plugin.zsh @@ -0,0 +1,24 @@ +c() { cd ~/code/$1; } + +_c() { _files -W ~/code -/; } +compdef _c c + + + + +b() { cd ~/code/biokm/$1; } + +_b() { _files -W ~/code/biokm -/; } +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 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 '