Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: logout from interactive subshell
- X-seq: zsh-users 10846
- From: "Com MN PG P E B Consultant 3" <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx>
- To: "Anton Zinoviev" <anton@xxxxxxxxxx>
- Subject: RE: logout from interactive subshell
- Date: Thu, 12 Oct 2006 14:50:59 +0200
- Cc: <bug-bash@xxxxxxx>, "zsh-users Mailinglist" <zsh-users@xxxxxxxxxx>
- In-reply-to: <20061012085526.GA6032@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Thread-index: Acbt561it6h4KhUiRZC1sFsaGn7BcQAFQVtg
- Thread-topic: logout from interactive subshell
> > (1) rlogin to a foreign host
> > (2) Invoke a subshell (for example because I'm setting a
> Clearcase
> > View)
> > (3) Logout from the host
> >
> > Step (3) needs two steps: First I have to type 'exit' to leave the
> > subshell, and then either 'exit' or 'logout' to leave the
> login shell.
>
> On step (2) you use
>
> exec bash
>
> instead of just bash.
This does not work in the general case since I don't know at the time of
invoking
bash, whether I will eventually just go back one level or logout
completely.
Imagine the following situation:
rlogin foo
VAR=val1
exec bash
VAR=val2
Now if at this point I would decide to not logout, but just go up one
level (in order
to have the old value of VAR restored), there is no way to do it -
typing exit would
log me out *unconditionally*.
Ronald
--
Ronald Fischer (phone +49-89-63676431)
mailto:mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author