add single letter command line options
[awesomized/libmemcached] / src / memstat.c
index 76fdd9c6dde3e308d3bbaedf0f4a8b3c409ff76b..dcfb3af96ea15ec725170e18da546c62eb76c653 100644 (file)
@@ -50,20 +50,20 @@ void options_parse(int argc, char *argv[])
 
   while (1) 
   {
-    option_rv = getopt_long(argc, argv, "", long_options, &option_index);
+    option_rv = getopt_long(argc, argv, "Vhvds:", long_options, &option_index);
     if (option_rv == -1) break;
     switch (option_rv) {
     case 0:
       break;
-    case OPT_VERSION: /* --version */
+    case OPT_VERSION: /* --version or -V */
       printf("memcache tools, memcat, v1.0\n");
       exit(0);
       break;
-    case OPT_HELP: /* --help */
+    case OPT_HELP: /* --help or -h */
       printf("useful help messages go here\n");
       exit(0);
       break;
-    case OPT_SERVERS: /* --servers */
+    case OPT_SERVERS: /* --servers or -s */
       opt_servers = optarg;
       break;
     case '?':