Changed prompt, added ability to customize by sourcing zshrc if it

exists
This commit is contained in:
2013-12-23 07:34:55 -08:00
parent b257630396
commit bc9df24067
4 changed files with 16 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
zshrc

9
.zshrc
View File

@@ -85,3 +85,12 @@ function follow() {
pushd `filepath $1`
fi
}
# Source per-instance customizations if they exist
if [ -e $HOME/.zcustom/zshrc ]; then
source $HOME/.zcustom/zshrc
fi
# Remove duplicate entries in the PATH
typeset -U path

View File

@@ -1,4 +1,4 @@
PROMPT='%n@%m %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} %{$reset_color%} %F{cyan}%~%f %F{red}%F{gray}%f '
PROMPT='%n@%m %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} %{$reset_color%} %F{cyan}%~%f %F{red}%F{yellow}%F{green}%f '
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

View File

@@ -1,5 +1,10 @@
#!/bin/sh
rm -f $HOME/.zshrc
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
mkdir -p $HOME/.oh-my-zsh/custom/plugins
cd $HOME/.oh-my-zsh/custom/plugins
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
cd $HOME
ln -s $HOME/.zcustom/.zshrc $HOME/.zshrc
ln -s $HOME/.zcustom/edorrington.zsh-theme.zsh $HOME/.oh-my-zsh/custom/edorrington.zsh-theme.zsh