bmk icon indicating copy to clipboard operation
bmk copied to clipboard

Add "-xargs" to pass params to executed binary

Open GWRon opened this issue 1 year ago • 1 comments

usage example:

./bmk makeapp -r -w -l linux -g x64 -t console -x -xargs "-v -bla 2 -dir \"c:\dir with space\subdir\"" -o /home/user/tests/test_args /home/user/tests/test_args.bmx

GWRon avatar Apr 17 '23 16:04 GWRon

test_args.bmx:

SuperStrict
Framework Brl.StandardIO

print "args: " + AppArgs.length
For local i:int = 0 until AppArgs.length
	print i+": " + AppArgs[i]
Next
$ ./bmk2 makeapp -r -w -l linux -g x64 -t console -x -xargsmerge -xargs "-v -bla 2 -bla 3 \"c:\dir with space\subdir\"" -o /home/ronny/Arbeit/Projekte/TVTower/Current/tests/test_args /home/ronny/Arbeit/Projekte/TVTower/Current/tests/test_args.bmx
Executing:test_args
args: 7
0: /home/ronny/Arbeit/Projekte/TVTower/Current/tests/test_args
1: -v
2: -bla
3: 2
4: -bla
5: 3
6: c:\dir with space\subdir

When passing "-xargsnomerge" then the first arg (the binary name) won't be prepended.

GWRon avatar Apr 17 '23 16:04 GWRon