FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 05-25-2012, 08:02 PM
Dan Douglas
 
Default lastpipe

As many are probably aware, Bash 4.2 adds a shopt feature to enable not
running the last command of a pipeline in a subshell (POSIX leaves it up to
the shell to decide). Aside from being a slight optimization, it allows some
syntactic convenience such as reduced reliance upon process substitutions and
redundant command grouping workarounds. I believe it is generally considered
that the lastpipe behavior is superior. zsh and ksh do this by default, while
mksh, bash, and dash do not. Only Bash has it as a configurable option.

If it were made a policy now that ebuilds and eclasses cannot depend upon the
subshell (for example, to set temporary positional parameters or isolate
temporary variables), then maybe someday in the distant future this could be
made the default, and in the meantime, an option for those with new enough
shells. Since dependence on the subshell isn't very common, I think this
should be feasible, and of course as a workaround all that's required is to
wrap any such commands in parentheses.

Any opinions?
--
Dan Douglas
 

Thread Tools




All times are GMT. The time now is 06:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org