On 13-01-07 03:46 AM, Lex Trotman wrote:
On 7 January 2013 20:25, Matthew Brush mbrush@codebrainz.ca wrote:
Hi,
I want to write a plugin that requires some command line options passed to it (through geany). Is there a way to make it so Geany will accept arbitrary arguments and then I can pick them out of /proc/<PID>/cmdline or something[1]? I tried but Geany currently errors out if it sees an option it does not recognize itself.
Assuming this is not possible currently, is there any sane way to pass arguments to plugins, maybe something like how you can pass `-Wl` to GCC to pass-through linker args or `-X` to valac to pass-through compiler args?
There is always (shuddddder) environment vars if you don't want to modify Geany.
In this case I need a command to pass to 3rd party library that will itself launch Geany and give it some arguments (meant to be handled by the plugin). I don't think it'd work with env vars.
Or you could add a multi-occurance option that takes string values, the -X sounds good (X for extensions == plugins). Make all the values available to plugins (GSlist maybe) which can pick and choose what they want.
So you get:
geany -X="plugin_name-option_name=value" -X="plugin2name-another_option=value" files
Yep, that's pretty much what I was figuring for this use. Anyone know what kind of PITA it would be to implement? I can guess "somewhat of a" but I've not really looked into the code yet.
Cheers, Matthew Brush