Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Global-alias problem with _expand



On Oct 10,  5:04pm, Sven Wischnowsky wrote:
} 
} Bart Schaefer wrote:
} 
} > By redirecting stderr on the eval?
} 
} Sigh.

I've been wondering whether _main_complete shouldn't do something like

[[ -t 2 ]] && exec 2>/dev/null

The problem of course is that there's no way to guarantee that the FD is
restored properly when the function exits.  ZLE itself closes and then
later restores stdin, so the `exec </dev/null' is safe, but anything that
triggers a zerr() can potentially prevent the function from restoring any
other FDs.

Maybe we've finally got a good enough handle on the zerr/zwarn thing that
we don't need to worry about this ... but I do anyway.

-- 
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   



Messages sorted by: Reverse Date, Date, Thread, Author