Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: checking if in interactive shell
- X-seq: zsh-users 84
- From: cross@xxxxxxxxxxxxx (Chris P. Ross)
- To: Laurent Wacrenier <Laurent.Wacrenier@xxxxxxxxxxxx>
- Subject: Re: checking if in interactive shell
- Date: Sun, 10 Sep 1995 01:45:37 -0400
- Cc: luomat@xxxxxxxxxxxxxxxxxxxxxxxxxxx, zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: Laurent Wacrenier's message of Sun, 10 September 1995 04:34:01 +0200 <199509100234.EAA02808@xxxxxxxxxxxxx>
- References: <199509100234.EAA02808@xxxxxxxxxxxxx>
Laurent Wacrenier <Laurent.Wacrenier@xxxxxxxxxxxx> said:
>> Ok, in csh I'd check for interactive shell via this:
> [ csh code deleted :]
>> how do I do this in zsh?
> I would do it like this :
> case "$-" in
> *i*) interactive ;;
> *) not interactive ;;
> esac
Doh! What's wrong with:
if [[ -o interactive ]]; then
# We're interactive!
fi
> -- Laurent
- Chris
Messages sorted by:
Reverse Date,
Date,
Thread,
Author