TP 201: Project 3 CLI Requirement

Author: parthik19Created Feb 25, 2021Updated May 29, 2023
Labelstype/enhancement

Feature Request

In project 3 for TP 201, the specs say that the --addr field should show up last for kvs-client. I think this isn't the best design because it unnecessarily complicates the subcommands set get and rm by forcing us to append the --addr field to each of them. (see the reference solution). Instead, if placed at the beginning, it makes the parsing much less verbose and also more intuitive, since the --addr is a feature of the kvs-client as opposed to the specific command being executed.

Is your feature request related to a problem?

No.

Describe the feature you'd like

Change the requirements for project 3 to indicate that the --addr field should show up in the beginning of the command. In other words, the specs should look something like this:

USAGE:
    kvs-client [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --addr <addr>     [default: 127.0.0.1:4000]

SUBCOMMANDS:
    get     
    help    Prints this message or the help of the given subcommand(s)
    rm      
    set     

Describe alternatives you've considered

There is no straightforward way (that I've come across in the past couple hours) that allows us to easily append a flag that applies to all subcommands at the very end.