Re: [PATCH v6 2/6] reset: introduce show-new-head-line option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/02, Junio C Hamano wrote:
> This is completely offtopic tangent, but I wonder how hidden-bool or
> hidden options[] element in general interacts with the recent
> addition of helping command line completion.  Are we already doing
> the right thing?

I had a quick look at this, and it looks like we're doing the right
thing here.  The following snipped from the 'show_gitcomp' function in
parse-options.c:


>	for (; opts->type != OPTION_END; opts++) {
>		const char *suffix = "";
>
>		if (!opts->long_name)
>			continue;
>		if (opts->flags & (PARSE_OPT_HIDDEN | PARSE_OPT_NOCOMPLETE))
>			continue;

So if the PARSE_OPT_HIDDEN flag is given, we skip printing the option,
which seems like the right thing to do.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux