Skip to content

Commit

Permalink
Use is-at-least (thanks dreur) and remove some commented code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfoster committed Jul 24, 2010
1 parent de01fb6 commit 24869c0
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions 10_hooks
Expand Up @@ -23,7 +23,7 @@ function title() {
# precmd is called just before the prompt is printed
function precmd() {
# This may not be the best way of doing this.
if [[ $ZSH_VERSION < 4.3.7 ]]
if [[ ! is-at-least < 4.3.7 ]]
then
vcs_info_msg_0_=$(git-prompt)
elif [[ $git_enable == 1 ]]
Expand All @@ -40,30 +40,3 @@ function precmd() {
function preexec() {
title "$1" "$USER@%m" "%35<...<%~"
}

# Loads up .env.rc or .env files if there in the current tree.
# http://stackoverflow.com/questions/171563/whats-in-your-zshrc#211917
# cd -q is only available on new zsh versions.
# i.e. it's in finks (4.5.6), but not Apple's (4.3.4)
#
# WARNING: this breaks 'cd -', since it seems to change oldpwd to /.
#
# if [[ $ZSH_VERSION > 4.3.4 ]]; then
# function chpwd; {
# DIRECTORY="$PWD"
# while true; do
# if [ -f './.env.rc' ]; then
# source './.env.rc'
# break
# fi
# # Removed as it clashes with zshkit'szshenv.
# # if [ -f './env' ]; then
# # source './env'
# # break
# # fi
# [ "$PWD" = '/' ] && break
# cd -q ..
# done
# cd -q "$DIRECTORY"
# }
# fi

0 comments on commit 24869c0

Please sign in to comment.