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

system() bug with shellslash on Win95

Expand Messages
  • Steve Hall
    I think this has been discussed here previously, but I find that system() is completely broken on Win95 (command.com) with shellslash set. I always have to
    Message 1 of 4 , Apr 1, 2003
      I think this has been discussed here previously, but I find that
      system() is completely broken on Win95 (command.com) with shellslash
      set. I always have to wrap any system() call by turning it off;
      probably should be a note at :help shellslash.

      --
      Steve Hall [ digitect@... ]
    • Bram Moolenaar
      ... shellslash is for using a Unix-like shell, not for command.com. It s mentioned in the second line in the help for shellslash ... -- FATHER: Did you
      Message 2 of 4 , Apr 2, 2003
        Steve Hall wrote:

        > I think this has been discussed here previously, but I find that
        > system() is completely broken on Win95 (command.com) with shellslash
        > set. I always have to wrap any system() call by turning it off;
        > probably should be a note at :help shellslash.

        'shellslash' is for using a Unix-like shell, not for command.com.
        It's mentioned in the second line in the help for 'shellslash'...

        --
        FATHER: Did you kill all those guards?
        LAUNCELOT: Yes ... I'm very sorry ...
        FATHER: They cost fifty pounds each!
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
      • Charles E. Campbell
        ... Note that shellslash is useful under Windows... if you re using cygwin, for example (a unix-like shell). I use set shell: name of shell to use for !
        Message 3 of 4 , Apr 3, 2003
          On Wed, Apr 02, 2003 at 11:34:37PM +0200, Bram Moolenaar wrote:
          >
          > > I think this has been discussed here previously, but I find that
          > > system() is completely broken on Win95 (command.com) with shellslash
          > > set. I always have to wrap any system() call by turning it off;
          > > probably should be a note at :help shellslash.
          >
          > 'shellslash' is for using a Unix-like shell, not for command.com.
          > It's mentioned in the second line in the help for 'shellslash'...
          ---------------------------------------------------------------------

          Note that shellslash is useful under Windows... if you're using
          cygwin, for example (a unix-like shell). I use

          " set shell: name of shell to use for ! and :! commands
          " set shq : shellquote -how to qquote characters about the cmd passed to shell
          " set sxq : shellxquote -includes redirection (shellquote excludes that)
          " set ssl : shellslash -when set, forward slash used to expand file names
          " set shcf : shellcmdflag-flag passed to shell to execute ! and :! commands
          " set sp : shellpipe -string used to put output of :make into errorfile
          " set srr : shellredir -string used to put output of filter cmd into temporary file

          set shell=bash
          set shq=
          set sxq=\"
          set ssl
          set shcf=-c
          set sp=>&


          for cygwin.

          Regards,
          Chip Campbell

          --
          Charles E Campbell, Jr, PhD _ __ __
          Goddard Space Flight Center / /_/\_\_/ /
          cec@... /_/ \/_//_/
          PGP public key: http://www.erols.com/astronaut/pgp.html
        • digitect@mindspring.com
          ... Yes, I appreciate both yours and Bram s clarification of this topic for me. Apparently I adopted shellslash very early in my Vim life as a way to use the
          Message 4 of 4 , Apr 3, 2003
            on 4/3/2003 9:46 AM Charles E. Campbell said the following:
            > On Wed, Apr 02, 2003 at 11:34:37PM +0200, Bram Moolenaar wrote:
            > > >
            > > > I think this has been discussed here previously, but I find that
            > > > system() is completely broken on Win95 (command.com) with
            > > > shellslash set. I always have to wrap any system() call by
            > > > turning it off; probably should be a note at :help shellslash.
            > >
            > > 'shellslash' is for using a Unix-like shell, not for command.com.
            > > It's mentioned in the second line in the help for 'shellslash'...
            >
            > Note that shellslash is useful under Windows... if you're using
            > cygwin, for example (a unix-like shell).

            Yes, I appreciate both yours and Bram's clarification of this topic
            for me. Apparently I adopted shellslash very early in my Vim life as a
            way to use the same scripts on both Windows and Linux. It's also an
            easy way to avoid the complexities of escaping backslashes in paths.

            Now that I see the real intention for the setting, I'm thinking my
            earlier approach was a bit heavy handed, although at this point I'll
            probably not change for the same reasons. And the only two downsides
            with using shellslash in command.com/cmd.exe environments are that you
            have to feel comfortable seeing forward slashes in paths and you have
            to remember to turn it off when using system(). ;)


            --
            Steve Hall [ digitect@... ]
          Your message has been successfully submitted and would be delivered to recipients shortly.