Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: problem testing file descriptor 3
- X-seq: zsh-users 8666
- From: "S. Cowles" <scowles@xxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: problem testing file descriptor 3
- Date: Mon, 11 Apr 2005 00:32:51 -0700
- In-reply-to: <20050411065827.GA1819@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: personal
- References: <200504102333.36134.scowles@xxxxxxxxxxxxx> <20050411065827.GA1819@xxxxxxxxxxxxxxxxxxxx>
- Reply-to: scowles@xxxxxxxxxxxxx
On Sunday 10 April 2005 23:58, Dominic Mitchell wrote:
> On Sun, Apr 10, 2005 at 11:33:32PM -0700, S. Cowles wrote:
> > I am having trouble testing if file descriptor 3 is already opened in the
> > calling environment. If the file descriptor is not open, I would like to
...
>
> The -t flag tests to see whether an fd is open *and attached to a
> terminal*. So it's probably no good for what you need.
Thank you.
> I think that the only way you could do this would be using the stat
> plugin.
>
> % zmodload -i zsh/stat
> % stat -f 3
Works beautifully. Cheers.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author