Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add space escaping for source command on makeprg setting #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions compiler/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,21 @@ if !b:is_hledger
CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m
" Skip all other lines:
CompilerSet errorformat+=%-G%.%#
exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . shellescape(expand(g:ledger_main))
exe 'CompilerSet makeprg='
\.substitute(g:ledger_bin, ' ', '\\ ', 'g')
\.'\ -f\ '
\.substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g')
\. '\ '
\.substitute(g:ledger_extra_options, ' ', '\\ ', 'g')
\.'\ source\ '
\.substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g')
else
exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ check\ '. substitute(g:ledger_extra_options, ' ', '\\ ', 'g')
exe 'CompilerSet makeprg='
\.substitute(g:ledger_bin, ' ', '\\ ', 'g')
\.'\ -f\ '
\.substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g')
\. '\ check\ '
\.substitute(g:ledger_extra_options, ' ', '\\ ', 'g')
CompilerSet errorformat=hledger:\ %trror:\ %f:%l:%c:
CompilerSet errorformat+=hledger:\ %trror:\ %f:%l:
CompilerSet errorformat+=hledger:\ %trror:\ %f:%l-%.%#:
Expand Down
Loading