[Geany-Devel] Accessing argv from plugins
dimitar.zhekov at gmail.com
Mon Jan 7 18:55:52 UTC 2013
On Mon, 07 Jan 2013 16:19:05 +0100
Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> Le 07/01/2013 10:25, Matthew Brush a écrit :
> > I want to write a plugin that requires some command line options passed
> > to it (through geany). [...]
> > 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?
> It's not currently possible, but if you want to implement this, using
> GOption's groups is the way to go. Though, we parse arguments long
> before loading the plugins, so maybe it'd be a bit hard to make it fit…
> however, IIRC it's totally possible not to error out on unknown
> arguments and then it'd be possible to re-parse what's left in argv
> after deciding whether or not to load plugins.
Woudn't it be easier to catch all -X in parse_command_line_options(),
like +NNN, store them in a list, and free on exit?
More information about the Devel