Loading ...
Sorry, an error occurred while loading the content.

Re: Re[2]: Strange behaviour of :compiler/:make/tidy

Expand Messages
  • Bram Moolenaar
    ... Since shellredir does get set to this value, I suppose shellpipe can use it as well. I suspect the current #ifdefs were made this way to avoid using
    Message 1 of 5 , Jun 7, 2002
    • 0 Attachment
      Dion Nicolaas wrote:

      > > :help shellpipe
      >
      > Thanks. Entirely correct.
      >
      > I just found it out the hard way (reading the sources).
      >
      > Some comments:
      > - The default on NT for shellpipe is ">". That doesn't seem to make
      > sense, as a lot of compilers will use stderr to redirect their errors
      > to. Apart from that, in most cases the Unix default becomes something
      > that includes stderr as well; and the shellredir option also includes
      > stderr, both for Unix and NT. I suggest the default becomes ">%s
      > @>&1", just like the shellredir option.

      Since 'shellredir' does get set to this value, I suppose 'shellpipe' can
      use it as well. I suspect the current #ifdefs were made this way to
      avoid using "tee". Try the patch below.

      > - The user manual is wrong. ":h 30.1", in the section "OUTPUT
      > REDIRECTION", it is stated that :make uses the shellredir option,
      > which it doesn't.

      I'll fix that.

      > - Why are there two separate options for redirection of shell commands
      > anyway?

      Because a filter command may need different redirection than what's used
      for ":make". On Unix "tee" is used to view the output while it's busy.


      *** ../vim61.088/src/option.c Sun May 5 22:51:14 2002
      --- src/option.c Fri Jun 7 20:33:31 2002
      ***************
      *** 2839,2848 ****
      # endif
      )
      {
      ! #if defined(FEAT_QUICKFIX) && !defined(WIN3264)
      if (do_sp)
      {
      p_sp = (char_u *)"|& tee";
      options[idx_sp].def_val[VI_DEFAULT] = p_sp;
      }
      #endif
      --- 2847,2860 ----
      # endif
      )
      {
      ! #if defined(FEAT_QUICKFIX)
      if (do_sp)
      {
      + # ifdef WIN3264
      + p_sp = (char_u *)">&";
      + # else
      p_sp = (char_u *)"|& tee";
      + # endif
      options[idx_sp].def_val[VI_DEFAULT] = p_sp;
      }
      #endif
      ***************
      *** 2869,2878 ****
      )
      # endif
      {
      ! #if defined(FEAT_QUICKFIX) && !defined(WIN3264)
      if (do_sp)
      {
      p_sp = (char_u *)"2>&1| tee";
      options[idx_sp].def_val[VI_DEFAULT] = p_sp;
      }
      #endif
      --- 2881,2894 ----
      )
      # endif
      {
      ! #if defined(FEAT_QUICKFIX)
      if (do_sp)
      {
      + # ifdef WIN3264
      + p_sp = (char_u *)">%s 2>&1";
      + # else
      p_sp = (char_u *)"2>&1| tee";
      + # endif
      options[idx_sp].def_val[VI_DEFAULT] = p_sp;
      }
      #endif

      --
      hundred-and-one symptoms of being an internet addict:
      128. You can access the Net -- via your portable and cellular phone.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.