Merge git://github.com/sjl/oh-my-zsh into sjl

This commit is contained in:
Matt Cable 2010-02-02 10:30:15 -07:00
commit f0d9edcbb9
7 changed files with 57 additions and 6 deletions

View file

@ -4,6 +4,9 @@ setopt auto_pushd
setopt pushd_ignore_dups
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias cd..='cd ..'
alias cd...='cd ../..'
alias cd....='cd ../../..'

View file

@ -44,7 +44,7 @@ function tab() {
end
tell application "Terminal"
activate
do script with command "cd \"$PWD\"; $*" in window 1
do script with command "cd \"$PWD\"; clear; $*" in window 1
end tell
EOF
}

View file

@ -5,10 +5,18 @@ function git_prompt_info() {
}
parse_git_dirty () {
if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
gitstat=$(git status 2>/dev/null | grep '\(# Untracked\|# Changes\|# Changed but not updated:\)')
if [[ $(echo ${gitstat} | grep -c "^# Changes to be committed:$") > 0 ]]; then
echo -n "$ZSH_THEME_GIT_PROMPT_DIRTY"
fi
if [[ $(echo ${gitstat} | grep -c "^\(# Untracked files:\|# Changed but not updated:\)$") > 0 ]]; then
echo -n "$ZSH_THEME_GIT_PROMPT_UNTRACKED"
fi
if [[ $(echo ${gitstat} | wc -l | tr -d ' ') == 0 ]]; then
echo -n "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
}

View file

@ -3,6 +3,7 @@ autoload -U url-quote-magic
zle -N self-insert url-quote-magic
## file rename magick
autoload -U zmv
bindkey "^[m" copy-prev-shell-word
## jobs

3
lib/python.zsh Normal file
View file

@ -0,0 +1,3 @@
function wo() {
[ -f './.venv' ] && workon `cat ./.venv`
}