* cygwin + /dev/stderr
@ 2003-01-19 23:13 Le Wang
2003-01-20 5:56 ` Bart Schaefer
2003-01-20 11:36 ` Borzenkov Andrey
0 siblings, 2 replies; 4+ messages in thread
From: Le Wang @ 2003-01-19 23:13 UTC (permalink / raw)
To: Zsh users list
Hi all,
I use /dev/stderr in my scripts profusely. Now that I
started using cygwin, these scripts would generally
fail. I understand that Bash has built in /dev/*
handling for cygwin, is there any plans for ZSh to
develop similar features?
What's the best way for me to handle this without
modifying all of my scripts?
Thanks.
--
Le
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cygwin + /dev/stderr
2003-01-19 23:13 cygwin + /dev/stderr Le Wang
@ 2003-01-20 5:56 ` Bart Schaefer
2003-01-20 11:36 ` Borzenkov Andrey
1 sibling, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2003-01-20 5:56 UTC (permalink / raw)
To: Zsh users list
On Jan 19, 6:13pm, Le Wang wrote:
}
} I use /dev/stderr in my scripts profusely. Now that I
} started using cygwin, these scripts would generally
} fail.
}
} What's the best way for me to handle this without
} modifying all of my scripts?
You can try:
alias -g /dev/stderr=/dev/fd/2
} I understand that Bash has built in /dev/*
} handling for cygwin, is there any plans for ZSh to
} develop similar features?
There is not, but zsh already has builtin handling of /dev/fd/N.
Note that neither bash nor zsh can help if you are passing /dev/stderr or
/dev/fd/N as a filename argument to a command, rather than using it as the
target of a redirection.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: cygwin + /dev/stderr
2003-01-19 23:13 cygwin + /dev/stderr Le Wang
2003-01-20 5:56 ` Bart Schaefer
@ 2003-01-20 11:36 ` Borzenkov Andrey
2003-01-25 4:49 ` Christopher Faylor
1 sibling, 1 reply; 4+ messages in thread
From: Borzenkov Andrey @ 2003-01-20 11:36 UTC (permalink / raw)
To: 'Le Wang', 'Zsh users list'
> Hi all,
>
> I use /dev/stderr in my scripts profusely. Now that I
> started using cygwin, these scripts would generally
> fail. I understand that Bash has built in /dev/*
> handling for cygwin, is there any plans for ZSh to
> develop similar features?
>
/dev/stderr is not and never has been portable. Any script that relies on
that is flawed as you just discovered.
> What's the best way for me to handle this without
> modifying all of my scripts?
>
The best way would still be to modify your scripts to avoid this problem in
future :) Who knows, may be you will use another Unix someday.
What version of Cygwin are you using? I have vague memory that Cygwin
emulates /dev/std* as well but may be wrong here.
-andrej
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cygwin + /dev/stderr
2003-01-20 11:36 ` Borzenkov Andrey
@ 2003-01-25 4:49 ` Christopher Faylor
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Faylor @ 2003-01-25 4:49 UTC (permalink / raw)
To: zsh-users
On Mon, Jan 20, 2003 at 02:36:13PM +0300, Borzenkov Andrey wrote:
>What version of Cygwin are you using? I have vague memory that Cygwin
>emulates /dev/std* as well but may be wrong here.
Unfortunately, cygwin doesn't emulate /dev/stderr, although it wouldn't
be hard to do. It might make sense to just add 'self' and 'fd' to the
/proc hierarchy like linux does.
I'll add it to the 'to-do' list.
cgf
(Mr. Cygwin)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-25 4:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-19 23:13 cygwin + /dev/stderr Le Wang
2003-01-20 5:56 ` Bart Schaefer
2003-01-20 11:36 ` Borzenkov Andrey
2003-01-25 4:49 ` Christopher Faylor
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).