GNOME Bugzilla – Bug 610241
[gjs-console] Add a --command/-c argument
Last modified: 2010-02-17 12:00:58 UTC
Add a command argument which allows you to specify a program as a string on the command line. This is similar to what python does.
Created attachment 154013 [details] [review] [gjs-console] Add a --command/-c argument
Review of attachment 154013 [details] [review]: Looks good enough anyhow. ::: gjs/console.c @@ +35,3 @@ { "include-path", 'I', 0, G_OPTION_ARG_STRING_ARRAY, &include_path, "Add the directory DIR to the list of directories to search for js files.", "DIR" }, static GOptionEntry entries[] = { + { "command", 'c', 0, G_OPTION_ARG_STRING, &command, "Program passed in as a string", "PROGRAM" }, Bit inconsistent with command vs. program terminology. Pick one and stick with it? @@ +78,2 @@ g_printerr("Failed to defined ARGV: %s", error->message); &error)) { Not in this patch, but I think way ARGV is defined isn't right with argc < 2.
The following fix has been pushed: a5fc606 [gjs-console] Add a --command/-c argument
Created attachment 154022 [details] [review] [gjs-console] Add a --command/-c argument Add a command argument which allows you to specify a program as a string on the command line. This is similar to what python does.