diff --git a/.zsh/lib/appearance.zsh b/.zsh/lib/appearance.zsh index 58194c5..320c2c1 100644 --- a/.zsh/lib/appearance.zsh +++ b/.zsh/lib/appearance.zsh @@ -23,13 +23,4 @@ else fi # Apply theming defaults -PS1="%n@%m:%~%# " - -# git theming default: Variables for theming the git info prompt -ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name -ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt -ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty -ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean - -# Setup the prompt with pretty colors -setopt prompt_subst \ No newline at end of file +PS1="%n@%m:%~%# " \ No newline at end of file diff --git a/.zsh/lib/promt.zsh b/.zsh/lib/promt.zsh new file mode 100644 index 0000000..59bd20c --- /dev/null +++ b/.zsh/lib/promt.zsh @@ -0,0 +1,25 @@ +# autoload -U add-zsh-hook +autoload -Uz vcs_info + +# # enable VCS systems you use +zstyle ':vcs_info:*' enable git svn +zstyle ':vcs_info:*:prompt:*' check-for-changes true + +setopt prompt_subst +autoload -U promptinit +promptinit + + +# Look at http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information +# for mor options +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' unstagedstr '*' # display this when there are unstaged changes +zstyle ':vcs_info:*' stagedstr '+' # display this when there are staged changes +zstyle ':vcs_info:*' actionformats '[%b%|%a%c%u%]%f' +zstyle ':vcs_info:*' formats ':%b%c%u%f' + + +zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' +precmd () { vcs_info } + +PROMPT='[%n@%m %~${vcs_info_msg_0_}] %{$reset_color%}' \ No newline at end of file diff --git a/.zshrc b/.zshrc index 37ce676..f97db73 100644 --- a/.zshrc +++ b/.zshrc @@ -2,9 +2,6 @@ export ZSH=~/.zsh PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting -# add a function path -fpath=($ZSH/functions $ZSH/completions $fpath) - # Load all of the config files in ~/oh-my-zsh that end in .zsh for config_file ($ZSH/lib/*.zsh) source $config_file