Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: avoid eval?



On 11/03/18 05:43 PM, Ray Andrews wrote:
On 11/03/18 03:53 PM, Marc Chantreux wrote:
"$@" expands as an array and "$*" expands as a string so
func () cp oldfile "$*"


Thanks so it does.  I tried that and 50 other ideas.  I just now realized it was because I had $IFS=$'\n'

set in another function :-(  Cost me half the day.

Is there any way to immunize my functions against $IFS trouble?  I have functions that seem to require " $IFS=$'\n' " and others that insist on " $IFS=' '  ".  It would be nice if I didn't have to reset it in each function.  I'll bet there will be syntax that always does the right thing regardless of $IFS.




Messages sorted by: Reverse Date, Date, Thread, Author