On 2012/03/21 13:02:20, Peng wrote: > Also think this CL could be split into two. ...
12 years, 8 months ago
(2012-03-22 06:33:32 UTC)
#3
On 2012/03/21 13:02:20, Peng wrote:
> Also think this CL could be split into two. we could submit i18n related
change
> first.
>
> https://codereview.appspot.com/5868046/diff/1/tools/main.vala
> File tools/main.vala (right):
>
> https://codereview.appspot.com/5868046/diff/1/tools/main.vala#newcode132
> tools/main.vala:132: { "engine", 'e', OptionFlags.OPTIONAL_ARG,
> OptionArg.CALLBACK,
> Looks like it will change current argument pattern. I think it is better to
keep
> origin one.
If we don't have '--engine', '--help' does not list the sub command, does it?
It seems '--' is hard-codded in goption.c
If we would have a common option likes '--get engine', '--get list-engine',
GOptionEntry.description would explain all the sub commands?
e.g.
Application Options:
-g, --get=SUB_COMMAND Get SUB_COMMAND which is one of engine, list-engine,
name-only.
-r --run=SUB_COMMAND
I'm not sure if no '--' is useful.
My main purpose is that '--help' lists the available options.
On 2012/03/22 06:33:32, fujiwara wrote: > On 2012/03/21 13:02:20, Peng wrote: > > Also think ...
12 years, 8 months ago
(2012-03-22 14:21:13 UTC)
#4
On 2012/03/22 06:33:32, fujiwara wrote:
> On 2012/03/21 13:02:20, Peng wrote:
> > Also think this CL could be split into two. we could submit i18n related
> change
> > first.
> >
> > https://codereview.appspot.com/5868046/diff/1/tools/main.vala
> > File tools/main.vala (right):
> >
> > https://codereview.appspot.com/5868046/diff/1/tools/main.vala#newcode132
> > tools/main.vala:132: { "engine", 'e', OptionFlags.OPTIONAL_ARG,
> > OptionArg.CALLBACK,
> > Looks like it will change current argument pattern. I think it is better to
> keep
> > origin one.
>
> If we don't have '--engine', '--help' does not list the sub command, does it?
> It seems '--' is hard-codded in goption.c
>
> If we would have a common option likes '--get engine', '--get list-engine',
> GOptionEntry.description would explain all the sub commands?
> e.g.
> Application Options:
> -g, --get=SUB_COMMAND Get SUB_COMMAND which is one of engine,
list-engine,
> name-only.
> -r --run=SUB_COMMAND
>
> I'm not sure if no '--' is useful.
> My main purpose is that '--help' lists the available options.
I think the mixing all sub commands help together is not clear. I prefer to git
style sub command. And it is also easy for bash-completion. You may check
completion script in ibus/tools/ibus.bash.
Issue 5868046: Added --help in ibus tool.
(Closed)
Created 12 years, 8 months ago by fujiwara
Modified 12 years, 8 months ago
Reviewers: shawn.p.huang_gmail.com
Base URL: git@github.com:ibus/ibus.git@master
Comments: 1