Skip to content

Commit 8b38aa7

Browse files
author
skywind3000
committed
fixed: minor issues
1 parent 3980337 commit 8b38aa7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

plugin/asyncrun.vim

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016, 2017, 2018, 2019, 2020
44
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
55
"
6-
" Last Modified: 2021/02/02 19:30
6+
" Last Modified: 2021/02/03 01:48
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -919,7 +919,13 @@ function! asyncrun#script_write(command, pause)
919919
let lines = ['#! ' . shell]
920920
let lines += [command]
921921
if a:pause != 0
922-
let lines += ['read -n1 -rsp "press any key to confinue ..."']
922+
if executable('bash')
923+
let pause = 'read -n1 -rsp "press any key to continue ..."'
924+
let lines += ['bash -c ''' . pause . '''']
925+
else
926+
let lines += ['echo "press enter to continue ..."']
927+
let lines += ['sh -c "read _tmp_"']
928+
endif
923929
endif
924930
let tmpname = fnamemodify(tempname(), ':h') . '/asyncrun.sh'
925931
endif
@@ -1874,7 +1880,7 @@ endfunc
18741880
" asyncrun - version
18751881
"----------------------------------------------------------------------
18761882
function! asyncrun#version()
1877-
return '2.8.0'
1883+
return '2.8.1'
18781884
endfunc
18791885

18801886

0 commit comments

Comments
 (0)