ndbroadbent/scm_breeze — Issue #12: local IFS="|" buggy and unnecessary
Author: reinh
Created: 2011-10-31 19:59:51+00:00
State: open

Setting IFS as a local seems broken in zsh (`$e1` includes the entire |-separated string of file names and `$e2` through `$eN` are empty) and should in any case be unnecessary. There are a couple of obvious solutions.

1. Store the original value in a temp and reset:

``` sh
oldIFS="$IFS"
# do stuff
IFS="$oldIFS"
```

2. Use a bash or zsh array. This should be preferable. For ZSH, that would be:

``` sh
filesArray=("${(s/|/)files}")
for file in $filesArray; do
# do stuff
done
```