git_status_shortcuts: don't clobber $IFS

This commit is contained in:
Tom "Ravi" Hale
2018-08-24 18:12:07 +07:00
parent 3a5b7a685a
commit d5c60b2cc5
7 changed files with 17 additions and 32 deletions

View File

@@ -125,11 +125,10 @@ if [ "$shell_ls_aliases_enabled" = "true" ] && which ruby > /dev/null 2>&1; then
fi
# Parse path from args
IFS=$'\n'
local IFS=$'\n'
for arg in "$@"; do
if [ -d "$arg" ]; then local rel_path="${arg%/}"; fi
done
unset IFS
# Replace user/group with user symbol, if defined at ~/.user_sym
# Before : -rw-rw-r-- 1 ndbroadbent ndbroadbent 1.1K Sep 19 21:39 scm_breeze.sh
@@ -175,14 +174,13 @@ EOF
ll_files="$(\ls "$@")"
fi
IFS=$'\n'
local IFS=$'\n'
for file in $ll_files; do
if [ -n "$rel_path" ]; then file="$rel_path/$file"; fi
export $git_env_char$e="$(eval $_abs_path_command \"${file//\"/\\\"}\")"
if [ "${scmbDebug:-}" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi
let e++
done
unset IFS
# Turn off shwordsplit unless it was on previously
if [[ $shell == "zsh" ]] && [ -z "$SHWORDSPLIT_ON" ]; then unsetopt shwordsplit; fi