add option to list all configured server connections
[shpub.git] / src / shpub / Cli.php
index 32dcbe2d929e5c0332571ebc3d372fa9924a3f38..a57b287fda084518f5f47f2066105507be58a45b 100644 (file)
@@ -32,6 +32,10 @@ class Cli
                 $cmd = new Command_Like($this->cfg->host);
                 $cmd->run($res->command->args['url']);
                 break;
+            case 'server':
+                $cmd = new Command_Server($this->cfg);
+                $cmd->run($res->command->options['verbose']);
+                break;
             default:
                 var_dump($this->cfg->host, $res);
                 Log::err('FIXME');
@@ -142,6 +146,18 @@ class Cli
             ]
         );
 
+        $cmd = $optParser->addCommand('server');
+        $cmd->addOption(
+            'verbose',
+            array(
+                'short_name'  => '-v',
+                'long_name'   => '--verbose',
+                'description' => 'Show more server infos',
+                'action'      => 'StoreTrue',
+                'default'     => false,
+            )
+        );
+
         //$cmd = $optParser->addCommand('post');
         $cmd = $optParser->addCommand('reply');
         $cmd->addArgument(