|
3 | 3 | " Maintainer: skywind3000 (at) gmail.com, 2016, 2017, 2018, 2019, 2020
|
4 | 4 | " Homepage: http://www.vim.org/scripts/script.php?script_id=5431
|
5 | 5 | "
|
6 |
| -" Last Modified: 2020/02/16 14:00 |
| 6 | +" Last Modified: 2020/02/16 21:32 |
7 | 7 | "
|
8 | 8 | " Run shell command in background and output to quickfix:
|
9 | 9 | " :AsyncRun[!] [options] {cmd} ...
|
@@ -1086,6 +1086,9 @@ function! s:start_in_terminal(opts)
|
1086 | 1086 | endif
|
1087 | 1087 | if get(a:opts, 'safe', get(g:, 'asyncrun_term_safe', 0)) != 0
|
1088 | 1088 | let command = s:ScriptWrite(a:opts.command, 0)
|
| 1089 | + if stridx(command, ' ') >= 0 |
| 1090 | + let command = shellescape(command) |
| 1091 | + endif |
1089 | 1092 | let shell = ''
|
1090 | 1093 | endif
|
1091 | 1094 | let avail = -1
|
@@ -1533,6 +1536,11 @@ function! asyncrun#run(bang, opts, args, ...)
|
1533 | 1536 | let l:macros['<root>'] = l:macros['VIM_ROOT']
|
1534 | 1537 | let l:retval = ''
|
1535 | 1538 |
|
| 1539 | + " handle: empty extension |
| 1540 | + if expand("%:e") == '' |
| 1541 | + let l:macros['VIM_FILEEXT'] = '' |
| 1542 | + endif |
| 1543 | + |
1536 | 1544 | " extract options
|
1537 | 1545 | let [l:command, l:opts] = s:ExtractOpt(s:StringStrip(a:args))
|
1538 | 1546 |
|
@@ -1651,7 +1659,7 @@ endfunc
|
1651 | 1659 | " asyncrun -version
|
1652 | 1660 | "----------------------------------------------------------------------
|
1653 | 1661 | function! asyncrun#version()
|
1654 |
| - return '2.4.3' |
| 1662 | + return '2.4.4' |
1655 | 1663 | endfunc
|
1656 | 1664 |
|
1657 | 1665 |
|
|
0 commit comments