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

What format is DlvExec expecting arguments? #36

Open
thams opened this issue Jan 7, 2020 · 3 comments
Open

What format is DlvExec expecting arguments? #36

thams opened this issue Jan 7, 2020 · 3 comments

Comments

@thams
Copy link

thams commented Jan 7, 2020

DlvExec ~/go/bin/acommand anargument

results in:

zsh:cd:1: no such file or directory: anargument

But any quoting of the command causes DlvExec to just split the buffer window.

@thams
Copy link
Author

thams commented Jan 7, 2020

Ah, looks like correct is:
DlvExec ~/go/bin/acommand -- anargument

@michaelbeaumont
Copy link

I discovered that DlvExec expects something like the following (using neovim) at the time of writing:

:DlvExec ./program . --\ subcommand\ subsubcommand

For its second argument it expects the directory to run in, for its second and final argument, it accepts one string. So you'll have to escape the space as needed.

@dzuqe
Copy link

dzuqe commented Aug 31, 2020

I found myself directly called the runCommand as I have much more complex args

call delve#runCommand("exec ./path/to/binary", "-- -c ./config.json", ".")

Found this in the following function

vim-delve/plugin/delve.vim

Lines 185 to 189 in d0729de

function! delve#dlvExec(bin, ...)
let dir = (a:0 > 0) ? a:1 : "."
let flags = (a:0 > 1) ? a:2 : ""
call delve#runCommand("exec ". a:bin, flags, dir)
endfunction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants