On 5/20/18 1:24 AM, Hideki Yamane wrote: > On Sat, 19 May 2018 20:18:17 +0200 > Philipp Kern <pk...@debian.org> wrote: >> You local'ed from and dest and now don't pass it anymore to >> wgetprogress. How does this work? > It is passed to wget via $@
So the way it works with your patch is that local variables are inherited by called functions (but not the caller). So from and dest from just_get() are visible in wgetprogress() and hence the construction of $@ works. I'd rather have $dest and $from be explicit parameters to wgetprogress. Given that you reset $@ anyway I don't see how that'd hurt. Kind regards Philipp Kern