James Vega wrote:

> On Thu, Apr 14, 2011 at 08:22:22PM -0400, Chris Sutcliffe wrote:
> > On 14 April 2011 20:11, Chris Sutcliffe wrote:
> > > On 14 April 2011 16:38, Chris Sutcliffe wrote:
> > >> I've noticed an issue with vim while running under mksh and pdksh.
> > >> Specifically, the stderr output by gcc (i.e. compilation warnings and
> > >> errors) is not captured in the QuickFix window.  I see the stderr
> > >> output in the terminal window during the compilation process, however,
> > >> when vim returns to the editor window and I execute a :cl or :copen, I
> > >> only see stdout output.
> > >
> > > Following up with one of the mksh developers he mentioned that mksh
> > > sets a close-on-exec flag on filedescriptors,
> > > which is a traditional Korn Shell security feature.  He's not sure if
> > > its related to the issue or not, but I figured I would pass it along.
> > 
> > I just realized the issue, looking at :h shellredir
> > 
> >         The default is ">".  For Unix, if the 'shell' option is "csh", 
> > "tcsh"
> >     or "zsh" during initializations, the default becomes ">&".  If the
> >     'shell' option is "sh", "ksh" or "bash" the default becomes
> >     ">%s 2>&1".  This means that stderr is also included.
> >     For Win32, the Unix checks are done and additionally "cmd" is checked
> >     for, which makes the default ">%s 2>&1".  Also, the same names with
> >     ".exe" appended are checked for.
> > 
> > pdksh and mksh aren't captured by the ksh rule, unless I explicitly
> > set the SHELL variable to be ksh.
> 
> Right.  So, either option.c has to learn about mksh/pdksh or people
> using those shells can add something like
> 
>   if &shell =~? '\%(m\|pd\)ksh'
>     set shellredir=>%s\ 2>&1
>   endif
> 
> to their vimrc.  On the bright side, at least Vim behaves better not
> knowing about mksh/pdksh than it does not knowing about fish. :) fish
> users get caught by much more subtle (and annoying) issues until they
> find out they have to "set shell=/bin/sh" (or some other shell Vim knows
> how to handle).

It's easy enough to add "mksh" and "pdksh" next to "ksh" in src/option.c

-- 
hundred-and-one symptoms of being an internet addict:
10. And even your night dreams are in HTML.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui