Skip to content

Commit 61cc308

Browse files
author
skywind3000
committed
revert ":AsyncRun :!start/b xxx" command format
1 parent aeedd1e commit 61cc308

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

plugin/asyncrun.vim

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016-2023
44
" Homepage: https://github.com/skywind3000/asyncrun.vim
55
"
6-
" Last Modified: 2023/09/25 23:10
6+
" Last Modified: 2023/09/25 23:19
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1875,33 +1875,28 @@ function! s:run(opts)
18751875
let g:asyncrun_cmd = l:command
18761876
let t = s:StringStrip(l:command)
18771877

1878-
if strpart(t, 0, 1) == ':' && g:asyncrun_strict == 0
1879-
if s:asyncrun_windows && t =~ '^:\s*\!\s*start\s*\/b\s\+'
1880-
let t = matchstr(t, '^:\s*\!\s*start\s*\/b\s\+\zs.*$')
1881-
let t = s:StringStrip(t)
1882-
if t == ''
1883-
return ''
1884-
endif
1885-
let l:command = t
1886-
let l:mode = 5
1887-
elseif s:asyncrun_windows && t =~ '^:\s*\!\s*start\s\+'
1888-
let t = matchstr(t, '^:\s*\!\s*start\s\+\zs.*$')
1889-
let t = s:StringStrip(t)
1890-
if t == ''
1891-
return ''
1892-
endif
1893-
let l:command = t
1894-
let l:mode = 4
1895-
else
1878+
if strpart(t, 0, 1) == ':'
1879+
if t !~ '^:\s*\!\!\+'
18961880
try
1897-
exec strpart(t, 1)
1881+
if g:asyncrun_strict == 0
1882+
exec strpart(t, 1)
1883+
endif
18981884
catch
18991885
redraw
19001886
echohl ErrorMsg
19011887
echo 'AsyncRun: ' . v:exception
19021888
echohl None
19031889
endtry
19041890
return ''
1891+
else
1892+
let b = matchstr(t, '^:\s*\!\zs\!\+')
1893+
let t = matchstr(t, '^:\s*\!\!\+\zs.*$')
1894+
let t = s:StringStrip(t)
1895+
if t == ''
1896+
return ''
1897+
endif
1898+
let l:command = t
1899+
let l:mode = (strlen(b) == 1)? 4 : 5
19051900
endif
19061901
elseif l:runner != ''
19071902
let obj = deepcopy(l:opts)
@@ -2300,7 +2295,7 @@ endfunc
23002295
" asyncrun - version
23012296
"----------------------------------------------------------------------
23022297
function! asyncrun#version()
2303-
return '2.12.1'
2298+
return '2.12.2'
23042299
endfunc
23052300

23062301

0 commit comments

Comments
 (0)