The documentation for the 'shellpipe' option in
runtime/doc/options.txt includes this:


     For Unix the default it "| tee".  The stdout of the compiler is saved
     in a file and echoed to the screen.  If the las'shell' option is "csh" or
     "tcsh" after initializations, the default becomes "|& tee".  If the
     'shell' option is "sh", "ksh", "zsh" or "bash" the default becomes
     "2>&1| tee".  This means that stderr is also included.
     The initialization of this option is done after reading the ".vimrc"
     and the other initializations, so that when the 'shell' option is set
     there, the 'shellpipe' option changes automatically, unless it was
     explicitly set before.

The comments in src/option.c says this:

     /*
      * Set 'shellpipe' and 'shellredir', depending on the 'shell' option.
      * This is done after other initializations, where 'shell' might have been
      * set, but only if they have not been set before.
      */

 [snip]

     /*
      * Isolate the name of the shell:
      * - Skip beyond any path.  E.g., "/usr/bin/csh -f" -> "csh -f".
      * - Remove any argument.  E.g., "csh -f" -> "csh".
      */

Neither of these seem consistent with what actually happens:

     1. Directory parts are indeed removed as the code (but not
        the documentation) indicates.

     2.  Subsequent arguments do not seem to be removed, or
          at least they still manage to cause the shellpipe option
          to be set to the non-bash default in my case:

               set shell=bash\ --rcfile\ ~/.vim_bash

          in the .vimrc causes shellpipe to end up as '| tee'.

Britton

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