File: po-escape.diff

package info (click to toggle)
vim-scripts 20130814
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 4,608 kB
  • ctags: 2,511
  • sloc: perl: 452; xml: 95; makefile: 25
file content (19 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- a/ftplugin/po.vim
+++ b/ftplugin/po.vim
@@ -263,14 +263,14 @@
       " Check if the file needs to be saved first.
       exe "if &modified | w | endif"
       if a:action == 'stats'
-         exe "!msgfmt --statistics -o /dev/null %"
+         exe "!msgfmt --statistics -o /dev/null " . shellescape(expand('%'), 1)
       elseif a:action == 'test'
          if exists("g:po_msgfmt_args")
             let args = g:po_msgfmt_args
          else
             let args = '-vv -c'
          endif
-         exe "make! " . args . " -o /dev/null %"
+         exe "make! " . args . " -o /dev/null " . shellescape(expand('%'))
          copen
       endif
    endf