Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: environment settings
- X-seq: zsh-workers 25240
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: environment settings
- Date: Mon, 23 Jun 2008 09:20:11 -0700
- In-reply-to: <20080623152431.GM4961@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080616074651.GB26165@marcus> <20080616080556.GA5091@xxxxxxxxxxxxxxx> <20080616123045.GC26165@marcus> <20080616124450.GC5091@xxxxxxxxxxxxxxx> <slrng5etlu.mft.joerg@xxxxxxxxxxxx> <20080621062649.GA28022@xxxxxxxxx> <20080621113659.GA20796@xxxxxxxxxxxxxxxxxxx> <20080621123049.GA7027@xxxxxxxxxxxxxxx> <20080622084152.GQ10734@xxxxxxxxxxxxxxxxxxx> <20080623152431.GM4961@xxxxxxxxxxxxxxx>
On Jun 23, 4:24pm, Stephane Chazelas wrote:
}
} It's true it would be nice to be able to distinguish between zsh
} instances that are meant to be user shells that is that are
} meant to parse command lines given by the user and instances
} that are meant to run canonical zsh code where the user is not
} meant to alter the zsh behavior (as in zsh scripts, zsh -c ...)
}
} With zsh, you could solve that by having $SHELL be /path/to/user-zsh
Unfortunately I think you at least have to turn this inside-out, because
/etc/passwd usually is restricted to values that are in /etc/shells.
So something like this in .zshenv:
if [[ $0 != (*/|)user-zsh && -o interactive ]]; then
export SHELL=~/bin/user-zsh
# ... etc. ...
fi
But that's not going to address Vincent's complaint that shells started
for globbing by e.g. GDB should pick up settings like extended_glob.
Even SHLVL isn't always accurate; what you'd really need to do is look
up the parent process and decide based on that.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author