Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: HOW TO distiguish between command input and forked subshell ?
- X-seq: zsh-workers 2109
- From: "Bart Schaefer" <bart@xxxxxxxxxxxxxxxxxxx>
- To: "C. v. Stuckrad" <stucki@xxxxxxxxxxxxxxxxx>
- Subject: Re: HOW TO distiguish between command input and forked subshell ?
- Date: Thu, 5 Sep 1996 16:23:13 -0700
- Cc: Zsh workers list <zsh-workers@xxxxxxxxxxxxxxx>
- In-reply-to: "C. v. Stuckrad" <stucki@xxxxxxxxxxxxxxxxx> "HOW TO distiguish between command input and forked subshell ?" (Sep 6, 12:47am)
- References: <Pine.GSO.3.95.960906003854.21956S-100000@petzval>
On Sep 6, 12:47am, C. v. Stuckrad wrote:
> Subject: HOW TO distiguish between command input and forked subshell ?
>
> Hi! (again :-)
You should be asking these questions on zsh-users rather than zsh-workers.
They don't have much to do with zsh development or build problems.
Not that it would matter much, since everybody on zsh-workers also gets
zsh-users, but some people might be filtering based on the To: address.
> Exactly, I want to have the function 'chpwd' give some output
> if triggered by 'cd' or 'chdir' BUT TO GIVE NO OUTPUT
> if triggered by cases like '... $(cd somewhere; ls)...'
>
> Might that be possible ?
chpwd() {
if [[ -t 1 ]]
then
print By golly, my standard output is a terminal.
fi
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author