1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 04:30:24 +02:00

21141: fix some issues associated with the {myfd}>... syntax

This commit is contained in:
Peter Stephenson 2005-04-14 16:24:42 +00:00
parent 24c329275a
commit c69b149cb5
4 changed files with 104 additions and 11 deletions

View file

@ -248,6 +248,11 @@
>Examining contents of logfile...
>This is my logfile.
setopt noclobber
exec {myfd}>logfile2
1q:NO_CLOBBER prevents overwriting parameter with allocated fd
?(eval):2: can't clobber parameter myfd containing file descriptor $myfd
exec {myfd}>&-
print This message should disappear >&$myfd
1q:Closing file descriptor using brace syntax
@ -256,7 +261,7 @@
typeset -r myfd
echo This should not appear {myfd}>nologfile
1:Error opening file descriptor using readonly variable
?(eval):2: read-only variable: myfd
?(eval):2: can't allocate file descriptor to readonly parameter myfd
typeset +r myfd
exec {myfd}>newlogfile