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

Re: destructive list-expand



On May 16, 12:24pm, Sven Wischnowsky wrote:
} Subject: Re: destructive list-expand
}
} Bart Schaefer wrote:
} 
} > This now gives the right thing for me with list-expand, but still fails
} > on _list_expansions (or _expand_word).
} 
} Yes, I pointed that out and the reason for it: _expand uses
} 
}       eval 'exp=( ${${(e)exp//\\[ 	
}     ]/ }//(#b)([ 	
}     ])/\\$match[1]} )' 2>/dev/null

Could we change that to:

	eval "exp=( $exp )" 2>/dev/null
	eval 'exp=( ${$exp//\\[
	]/ }//(#b)([
	])/\\$match[1]} )' 2>/dev/null

Or is that going to break something else?  (It fixes the specific example
we've been using, but I haven't tried any other examples e.g. that really
do have carriage-returns or other backslashed-whitespace in the results.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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