Fix defaut IFS for Ubuntu 11.x

This commit is contained in:
Nathan Broadbent
2012-03-08 17:35:03 +08:00
parent b90a8b9c8b
commit aca96a5e8c
5 changed files with 13 additions and 13 deletions

View File

@@ -33,7 +33,7 @@ design() {
local project=`basename $(pwd)`
local all_project_dirs="$design_base_dirs $design_av_dirs"
# Ensure design dir contains all subdirectories
unset IFS
IFS=$' \t\n'
# Create root design dirs
for dir in $design_ext_dirs; do mkdir -p "$root_design_dir/$dir"; done
# Create project design dirs

View File

@@ -114,7 +114,7 @@ git_status_shortcuts() {
# so just use plain 'git status'
git status
fi
unset IFS
IFS=$' \t\n'
zsh_reset # Reset zsh environment to default
}
# Template function for 'git_status_shortcuts'.

View File

@@ -99,7 +99,7 @@ function git_index() {
# --------------------
# Go to our base path
if [ -n "$base_path" ]; then
unset IFS
IFS=$' \t\n'
# evaluate ~ if necessary
if [[ "$base_path" == "~"* ]]; then
base_path=$(eval echo ${base_path%%/*})/${base_path#*/}
@@ -112,7 +112,7 @@ function git_index() {
fi
fi
fi
unset IFS
IFS=$' \t\n'
}
_git_index_dirs_without_home() {
@@ -127,7 +127,7 @@ function _find_git_repos() {
echo ${repo%/.git} # Return project folder, with trailing ':'
_find_git_submodules $repo # Detect any submodules
done
unset IFS
IFS=$' \t\n'
}
# List all submodules for a git repo, if any.
@@ -146,7 +146,7 @@ function _rebuild_git_index() {
for repo in $(echo -e "$(_find_git_repos)\n$(echo $GIT_REPOS | sed "s/:/\\\\n/g")"); do
echo $(basename $repo | sed "s/ /_/g") $repo
done | sort | cut -d " " -f2- > "$GIT_REPO_DIR/.git_index"
unset IFS
IFS=$' \t\n'
if [ "$1" != "--silent" ]; then
echo -e "===== Indexed $_bld_col$(_git_index_count)$_txt_col repos in $GIT_REPO_DIR/.git_index"
@@ -218,7 +218,7 @@ _git_index_update_all_branches() {
echo "=== Skipping $branch: remote and merge refs are not configured."
fi
done
unset IFS
IFS=$' \t\n'
# Update all remotes if there are any branches to update
if [ -n "${branches[*]}" ]; then git fetch --all 2> /dev/null; fi
@@ -257,7 +257,7 @@ function _git_index_batch_cmd() {
cwd="$PWD"
if [ -n "$1" ]; then
echo -e "== Running command for $_bld_col$(_git_index_count)$_txt_col repos...\n"
unset IFS
IFS=$' \t\n'
local base_path
for base_path in $(sed -e "s/--.*//" "$GIT_REPO_DIR/.git_index" | grep . | sort); do
builtin cd "$base_path"
@@ -303,7 +303,7 @@ function _git_index_tab_completion() {
else
COMPREPLY=($(compgen -W '$(sed -e "s:.*/::" -e "s:$:/:" "$GIT_REPO_DIR/.git_index" | sort)' -- $curw))
fi
unset IFS
IFS=$' \t\n'
return 0
}

View File

@@ -40,7 +40,7 @@ git_status_shortcuts() {
if [ "$scmbDebug" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi
let e++
done
unset IFS
IFS=$' \t\n'
if [ "$scmbDebug" = "true" ]; then echo "------------------------"; fi
# Print status
@@ -115,7 +115,7 @@ git_silent_add_patch_shortcuts() {
git add -p "$file"
echo -e "# add '$file'"
done
unset IFS
IFS=$' \t\n'
echo "#"
fi
}

View File

@@ -63,7 +63,7 @@ EOF
for dir in $GIT_REPOS; do
mkdir -p $dir; cd $dir; git init;
done
unset IFS
IFS=$' \t\n'
verboseGitCommands
@@ -74,7 +74,7 @@ oneTimeTearDown() {
rm -rf "${GIT_REPO_DIR}"
IFS=":"
for dir in $GIT_REPOS; do rm -rf $dir; done
unset IFS
IFS=$' \t\n'
}
ensureIndex() {