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

Shell escapes not working

Expand Messages
  • Mark S.
    In gVim 7.1 under Ubuntu/Debian, if I try to make any two-part shell ... I still get the error. ... then it works. On gvim 7.1 under Windows XP/Cygwin, I don t
    Message 1 of 4 , Oct 1, 2008
    • 0 Attachment
      In gVim 7.1 under Ubuntu/Debian, if I try to make any two-part shell
      command, like:

      :!ls *.java

      I get a command not found error. If I escape the space like this:

      :!ls\ *.java

      I still get the error.

      If I put the command in quotes, like this:

      :!"ls *.java"

      then it works.

      On gvim 7.1 under Windows XP/Cygwin, I don't have this problem.

      :help shell was not very helpful.

      How do I get gvim to acknowledge escaped spaces?

      Thank you

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... Which shell are you using on Ubuntu/Debian? On SuSE Linux with bash, ... (in gvim 7.2.23 with GTK2 GUI) answers with (on one line) the names of the five
      Message 2 of 4 , Oct 1, 2008
      • 0 Attachment
        On 02/10/08 02:11, Mark S. wrote:
        > In gVim 7.1 under Ubuntu/Debian, if I try to make any two-part shell
        > command, like:
        >
        > :!ls *.java
        >
        > I get a command not found error. If I escape the space like this:
        >
        > :!ls\ *.java
        >
        > I still get the error.
        >
        > If I put the command in quotes, like this:
        >
        > :!"ls *.java"
        >
        > then it works.
        >
        > On gvim 7.1 under Windows XP/Cygwin, I don't have this problem.
        >
        > :help shell was not very helpful.
        >
        > How do I get gvim to acknowledge escaped spaces?
        >
        > Thank you

        Which shell are you using on Ubuntu/Debian? On SuSE Linux with bash,

        :!ls *.log

        (in gvim 7.2.23 with GTK2 GUI) answers with (on one line) the names of
        the five *.log files in my home directory.

        You might want to try

        :!/bin/ls *.java

        to avoid any shell builtins or aliases there might be. Then if it works,
        try to find out what is actually used when you type ls at the shell prompt.


        Best regards,
        Tony.
        --
        " I changed my headlights the other day. I put in strobe lights
        instead! Now when I drive at night, it looks like everyone else is
        standing still ..."
        -- Steven Wright

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • John Little
        ... My Kubuntu gvim 7.1.138 has no problem, using bash. That s the version in the ubuntu repositories. Nor does gvim 7.2. ... Then (using *.pl instead) I get
        Message 3 of 4 , Oct 1, 2008
        • 0 Attachment
          On Oct 2, 1:11 pm, "Mark S." <throa...@...> wrote:
          > In gVim 7.1 under Ubuntu/Debian, if I try to make any two-part shell
          > command, like:
          >
          >   :!ls *.java
          >
          > I get a command not found error. If I escape the space like this:

          My Kubuntu gvim 7.1.138 has no problem, using bash. That's the
          version in the ubuntu repositories. Nor does gvim 7.2.

          >If I put the command in quotes, like this:
          >
          > :!"ls *.java"
          >
          >then it works.

          Then (using *.pl instead) I get

          /bin/bash: ls *.pl: command not found

          shell returned 127

          which is what I expect. Maybe you've got weird 'shell' or
          'shellcmdflag' option settings; do you still have a problem running

          gvim -u NONE -U NONE

          Regards, John
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Mark S.
          Hello John & Tony, ... Thanks for the encouragement! I dug a little deeper and it turned out to be the shellxquote variable which came along when I was
          Message 4 of 4 , Oct 1, 2008
          • 0 Attachment
            Hello John & Tony,

            --- On Wed, 10/1/08, Tony Mechelynck <antoine.mechelynck@...> wrote:
            --- On Wed, 10/1/08, John Little <John.B.Little@...> wrote:

            Thanks for the encouragement! I dug a little deeper and it turned out to
            be the shellxquote variable which came along when I was transferring
            settings from my cygwin setup.

            Thanks!
            Mark


            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.