Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hbina
Copy link
Contributor

@hbina hbina commented Oct 18, 2020

Related issue #139

TIL about Linux's optarg.

@hbina hbina changed the title Add v as short arg Add -V as short for --version Oct 18, 2020
@YaacovHazan
Copy link
Collaborator

@hbina why not just to fix the existing -v option?

@hbina
Copy link
Contributor Author

hbina commented Oct 20, 2020

Hmm well you are right, I could have just fixed the old 'v'. IDK which is preferred, but you can edit this commit if you prefer that.

@hbina hbina force-pushed the add_V_as_short_arg branch from 5f6d12e to bf78ce2 Compare October 20, 2020 14:27
@hbina
Copy link
Contributor Author

hbina commented Oct 20, 2020

I have applied your suggestion and fixed help string to also display short name for `--help. The diff is a lot smaller now.

" -D, --debug Print debug output\n"
" --client-stats=FILE Produce per-client stats file\n"
" --out-file=FILE Name of output file (default: stdout)\n"
" -o --out-file=FILE Name of output file (default: stdout)\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls add ","

" --cluster-mode Run client in cluster mode\n"
" --help Display this help\n"
" --version Display version information\n"
" -h --help Display this help\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls add ","

Also updated help string.
Related issue: redis#139

Signed-off-by: Hanif Bin Ariffin <[email protected]>
@hbina hbina force-pushed the add_V_as_short_arg branch from bf78ce2 to 718df87 Compare October 21, 2020 05:51
@yaacovhazan-Redislabs yaacovhazan-Redislabs merged commit 793d74d into redis:master Oct 21, 2020
@yaacovhazan-Redislabs
Copy link
Contributor

thank you @hbina for the PR... merged

@hbina hbina deleted the add_V_as_short_arg branch October 21, 2020 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants