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

Re: [OT] export http_proxy

On Jun 22,  1:51am, Shao Zhang wrote:
} Subject: Re: [OT] export http_proxy
} Bart Schaefer [schaefer@xxxxxxxxxxxxxxxx] wrote:
} > On Fri, 16 Jun 2000, Shao Zhang wrote:
} > 
} > 	case ${${(M)$(ifconfig ppp0):#addr:*}#addr:} in
} > export HTTP_PROXY=;;
} > typeset +x HTTP_PROXY; unset HTTP_PROXY;;
} > 	and-so-on) export HTTP_PROXY=and-so-forth;;
} > 	esac
}     Thanks again. This is my perfect solution. Putting an extra line
}     killall -USR2 zsh in the ip-up script made it all happen.
}     Also, I am just wondering, are all these features unique to zsh, or
}     other shells have got them as well?

All Bourne-shell-like shells have the "trap" command.  As far as I know,
zsh is the only one that uses magically-named TRAPxxx functions.

Csh-like shells generally handle only INT and TERM signals, and then only
in scripts, not interactively.

On Jun 22,  2:12am, Shao Zhang wrote:
}     Now, this fails when I open up a new xterm, is there anyway to allow
}     all the zsh process to share certain shell variables?

Why not simply execute the trap handler code (e.g. the "case" above) in
your .zshenv file, to set the variable properly as each shell starts?

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