vim-delve icon indicating copy to clipboard operation
vim-delve copied to clipboard

What format is DlvExec expecting arguments?

Open thams opened this issue 5 years ago • 3 comments

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 avatar Jan 07 '20 03:01 thams

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

thams avatar Jan 07 '20 17:01 thams

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.

michaelbeaumont avatar May 28 '20 14:05 michaelbeaumont

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 https://github.com/sebdah/vim-delve/blob/d0729de877dc17e33adb594a54d826a013cb24fd/plugin/delve.vim#L185-L189

dzuqe avatar Aug 31 '20 23:08 dzuqe