Skip to content

Commit

Permalink
Fix indentation and add block delimiters to for loops.
Browse files Browse the repository at this point in the history
This should make things easier to read.
  • Loading branch information
mattfoster committed Jan 12, 2011
1 parent 3f42749 commit 0556eba
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions 01_path
Expand Up @@ -18,17 +18,18 @@ pathdirs=(
# Query the gem configuration to get the correct path
# XXX: This might cause problems if you alias 'gem' to something else after the path has been setup.
if [[ -x $(which gem) ]]; then
# 's.:.' creates an array by splitting on ':'.
gemdirs=(${(s.:.)"$(gem environment gempath)"})
# The paths above don't end with /bin.
for dir ($gemdirs) { pathdirs=($pathdirs "$dir/bin") }
# 's.:.' creates an array by splitting on ':'.
gemdirs=(${(s.:.)"$(gem environment gempath)"})
# The paths above don't end with /bin.
for dir ($gemdirs) { pathdirs=($pathdirs "$dir/bin") }
fi

# Add directories which exist to the path
for dir ($pathdirs)
for dir ($pathdirs) {
if [[ -d $dir ]]; then
path=($dir $path)
fi
}

# Allow MacPorts man pages and others
dirs=(
Expand All @@ -40,10 +41,11 @@ dirs=(
)

# Add directories which exist to the manpath
for dir ($dirs)
for dir ($dirs) {
if [[ -x $dir ]]; then
manpath=($manpath $dir)
fi
}

# Add function paths
local binary=$(which zsh)
Expand All @@ -56,9 +58,10 @@ funcdirs=(
)

# Add exxisting function directories to the fpath
for dir ($funcdirs)
for dir ($funcdirs) {
if [[ -x $dir ]]; then
fpath=($fpath $dir)
fi
}

typeset -gU path cdpath manpath fpath

0 comments on commit 0556eba

Please sign in to comment.