From: Andrej Borsenkow <borsenkow.msk@sni.de>
To: Zsh workers list <zsh-workers@math.gatech.edu>
Cc: Bart Schaefer <bart@sunny.netmanage.com>
Subject: Re: HOW TO distiguish between command input and forked subshell ?
Date: Fri, 6 Sep 1996 13:08:49 +0400 (MOW) [thread overview]
Message-ID: <Pine.SV4.3.95.960906130237.14332A-100000@itsrm1.mow.sni.de> (raw)
In-Reply-To: <960905162314.ZM11373@admin.diego.netmanage.com>
On Thu, 5 Sep 1996, Bart Schaefer wrote:
>
> > 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
> }
>
There is a little problem with output of chdir(). Here follows:
if I cd to non-local directory using CDPATH, cd will report current
directory after changing to it. I always found it boring (as I have
directory in prompt anyway) and suggested the option to shut it off. The
answer was (as expected ;) that I can use
cd () { builtin cd $* > /dev/null }
Well, it works, but any output from chdir() is also lost :( I don't
know, if it is right, that chdir() is using the same descriptor as cd, but
if it is to be so, may be new option is still useful?
greetings
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------
next prev parent reply other threads:[~1996-09-06 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-05 22:47 C. v. Stuckrad
1996-09-05 23:23 ` Bart Schaefer
1996-09-06 9:08 ` Andrej Borsenkow [this message]
1996-09-06 10:47 ` Zoltan Hidvegi
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=Pine.SV4.3.95.960906130237.14332A-100000@itsrm1.mow.sni.de \
--to=borsenkow.msk@sni.de \
--cc=bart@sunny.netmanage.com \
--cc=zsh-workers@math.gatech.edu \
/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).