Re: [chrony-users] [patch] adds tab-completion to chronyc

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Thu, Dec 08, 2016 at 07:59:24AM -0600, Lonnie Abelbeck wrote:
> On Dec 8, 2016, at 12:36 AM, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
> > Thanks, Lonnie. This is useful. Would it be possible to parse the list
> > of commands from the usage text instead of maintaining a separate
> > list? The chronyc support in bash-completition works like that.
> 
> I presume you meant the "help" output ... Yes, I briefly looked at that, probably more code would be required than the data size of command_names[], and the command_names[] entries can be tweaked specifically for tab-completion.
> 
> My thought is to keep things simple (as this patch does) and have a separate tab-completion list.
> 
> Possibly, down the road. give_help() text, process_line() parsing matches, and tab-completion text could all be in one structure, but probably not worth stirring-the-code over.

Ok, fair enough.

The patch looks good to me and it seems to be working nicely. I'll
just make the strings const and move them so they are closer to the
help text and it's less likely to update one without the other. I hope
that's ok with you.

Thanks,

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/