Alexey Serbin has posted comments on this change.

Change subject: tool: better handling for positional arguments

Patch Set 1:

 > There is a Go library which allows to implement rich CLI tools.  If
 > using the library it's really easy to document the
 > commands/sub-commands/parameters and it provides tab-completion
 > support for shell as an additional feature.  It might be useful to
 > take a look at that:
 > There is even more powerful library named Cobra:
 > We implemented very decent command-line tool using codegangsta/cli
 > library in one of prior projects.
 > Also, if talking about command-line tools: given the abundance of
 > CLI libraries, it might make sense to consider an option to
 > implement those in Go.  It's really fast and simple in development
 > and seems to be the perfect language choice for that sort of
 > things.

I re-read my comment and it seemed like I was too much advocating for using 
Golang :)

In fact, I mostly meant it might be useful/insightful to take a look at the cli 
package.  To me it looked very convenient the way how to specify commands, 
sub-commands and options in the code.  Also, if it makes sense to exercise bash 
completion to in displaying available sub-commands, it would also make sense to 
check that.  Basically, it's about outputting the available sub-commands if 
given --enable-bash-completion option at any level.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic6aa517ccf1915e4d106bcc5f80a3abfeae03271
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <>
Gerrit-Reviewer: Alexey Serbin <>
Gerrit-Reviewer: Dan Burkert <>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <>
Gerrit-HasComments: No

Reply via email to