Britton Kerin wrote: > 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.
I thought this was obvious. I'll add a remark to avoid confusion. > 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'. Vim thinks the path is "bash --rcfile ~/" and the shell name ".vim_bash". Since spaces in the path are not escaped it's difficult to come up with a better solution. I suppose on Unix we can assume the path does not contain a space. I'll make a patch that works that way. -- hundred-and-one symptoms of being an internet addict: 29. Your phone bill comes to your doorstep in a box. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.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
