Author Topic: Multi-Tag returning path with escaped spaces  (Read 13754 times)

PrimaMateria

  • Newbie
  • *
  • Posts: 1
    • View Profile
Multi-Tag returning path with escaped spaces
« on: September 12, 2014, 13:44:53 »
Hi,
in last days I started to learn and use gvim. For the easy access I have created new User Command and assigned it to hotkey.
But I hit a problem, when opening files with path containing space, because Gvim considers argument with spaces as separate arguments, even if it is encapsulated in apostrophes .

It would be nice, if there will exist some multi-tag escaping spaces.

Command: MC.Run CMD=gvim ARG="${focusfilepath}"

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4488
    • View Profile
    • Multi Commander
Re: Multi-Tag returning path with escaped spaces
« Reply #1 on: September 12, 2014, 14:29:02 »
If you need to include " inside the quoted string. Then you can use ' (single quote character) instead of " for the encapsulating the text


Quote
ARG=' My text has "quote" characters inside the value'


Quote
MC.Run CMD=gvim ARG='"${focusfilepath}"'

Crash+Burn

  • Junior Member
  • **
  • Posts: 33
    • View Profile
Re: Multi-Tag returning path with escaped spaces
« Reply #2 on: September 18, 2014, 22:01:24 »
Awesome that that works. Not so awesome that Linux tools/utilities/shells are so stupid about quotes and escapes. They could of easily disallowed \ and " in filenames and it would of simplified usage of the command-line tools and other utilities.