Skip to content

Commit 34ede3e

Browse files
committed
Fix multiline command printing
1 parent 1ab5e01 commit 34ede3e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

autoload/run.vim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,9 @@ function! run#Run(cmd, ...) abort
119119

120120
" run job as shell command to tempfile w/ details
121121
let date_cmd = 'date +"' . s:run_timestamp_format . '"'
122-
let startline = has('nvim') ? 1 : 2
123122
call writefile(split(a:cmd, "\n"), currentcmdpath)
124123
call writefile([
125-
\ 'printf "COMMAND: "',
126-
\ 'cat ' . currentcmdpath . " | sed '".startline.",${s/^/ /g}'",
124+
\ 'printf "COMMAND: " && cat ' . currentcmdpath . " | sed '2,$s/^/ /g'",
127125
\ 'echo WORKDIR: ' . getcwd(),
128126
\ 'STARTED=$('.date_cmd.')',
129127
\ 'echo "STARTED: $STARTED"',

0 commit comments

Comments
 (0)