multiple command alias and redirection

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Nov 18, 2009
Searching the forum it seems in the past that the rest of command line expansion %$ in an alias would include redirection as well, but in current testing it no longer appears to do so.

I have an alias to temporarily set a proxy for wget
wget=setlocal %+ set HTTP_proxy=xxx %+ *wget --proxy %$ %+ endlocal

(I thought there was a syntax for temporary environment variable setting but I misplaced the reference, so I am using setlocal/endlocal.)

Now if I do
wget --help | grep proxy

I get all of the help output because the expansion leaves the | grep proxy after the endlocal.

How can I fix this?