zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Shao Zhang <shao@linux.cia.com.au>,
	ZSH Mail List <zsh-users@sunsite.auc.dk>
Subject: Re: [OT] export http_proxy
Date: Wed, 21 Jun 2000 16:39:37 +0000	[thread overview]
Message-ID: <1000621163937.ZM31284@candle.brasslantern.com> (raw)
In-Reply-To: <20000622015151.A6048@localhost>
In-Reply-To: <20000622021256.A6423@localhost>

On Jun 22,  1:51am, Shao Zhang wrote:
} Subject: Re: [OT] export http_proxy
}
} Bart Schaefer [schaefer@brasslantern.com] wrote:
} > On Fri, 16 Jun 2000, Shao Zhang wrote:
} > 
} > 	case ${${(M)$(ifconfig ppp0):#addr:*}#addr:} in
} > 	192.168.68.1) export HTTP_PROXY=192.168.68.215;;
} > 	192.168.86.9) 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   


      reply	other threads:[~2000-06-21 16:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-15 16:34 Shao Zhang
2000-06-15 21:42 ` Bart Schaefer
2000-06-21 15:51   ` Shao Zhang
2000-06-21 16:12     ` Shao Zhang
2000-06-21 16:39       ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000621163937.ZM31284@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=shao@linux.cia.com.au \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).