Replaced all occurences of 'local IFS=' with 'IFS= ... unset IFS'. Fixes #12
This commit is contained in:
@@ -22,7 +22,7 @@ git_status_shortcuts() {
|
||||
# Run ruby script, store output
|
||||
cmd_output=$(/usr/bin/env ruby "$scmbDir/lib/git/status_shortcuts.rb" $@)
|
||||
# Print debug information if $scmbDebug = "true"
|
||||
if [ "$scmbDebug" = "true" ]; then
|
||||
if [ "$scmbDebug" = "true" ]; then
|
||||
printf "status_shortcuts.rb output => \n$cmd_output\n------------------------\n"
|
||||
fi
|
||||
if [[ -z "$cmd_output" ]]; then
|
||||
@@ -33,13 +33,14 @@ git_status_shortcuts() {
|
||||
files="$(echo "$cmd_output" | grep '@@filelist@@::' | sed 's%@@filelist@@::%%g')"
|
||||
if [ "$scmbDebug" = "true" ]; then echo "filelist => $files"; fi
|
||||
# Export numbered env variables for each file
|
||||
local IFS="|"
|
||||
IFS="|"
|
||||
local e=1
|
||||
for file in $files; do
|
||||
export $git_env_char$e="$file"
|
||||
if [ "$scmbDebug" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi
|
||||
let e++
|
||||
done
|
||||
unset IFS
|
||||
|
||||
if [ "$scmbDebug" = "true" ]; then echo "------------------------"; fi
|
||||
# Print status
|
||||
@@ -112,11 +113,12 @@ git_add_patch_shortcuts() {
|
||||
git_silent_add_patch_shortcuts() {
|
||||
if [ -n "$1" ]; then
|
||||
# Expand args and process resulting set of files.
|
||||
local IFS=$'\n'
|
||||
IFS=$'\n'
|
||||
eval for file in $(git_expand_args "$@")\; do\
|
||||
git add -p "\$file"\;\
|
||||
echo -e "# add '\$file'"\;\
|
||||
done
|
||||
unset IFS
|
||||
echo "#"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user