diff --git a/lib/cli.py b/lib/cli.py
index 70154602c378db1fce68bf1d294d8385b8e79f80..776c42a44f745356f7ee952c1f9715c53fa35a1a 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -72,6 +72,7 @@ __all__ = [
   "OS_OPT",
   "OS_SIZE_OPT",
   "SEP_OPT",
+  "SHOWCMD_OPT",
   "SINGLE_NODE_OPT",
   "SUBMIT_OPT",
   "SYNC_OPT",
@@ -597,6 +598,10 @@ NOSTART_OPT = cli_option("--no-start", dest="start", default=True,
                          action="store_false",
                          help="Don't start the instance after creation")
 
+SHOWCMD_OPT = cli_option("--show-cmd", dest="show_command",
+                         action="store_true", default=False,
+                         help="Show command instead of executing it")
+
 
 def _ParseArgs(argv, commands, aliases):
   """Parser for the command line arguments.
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 6329233f30e1c5f0ec316d132f61f1df9293a35b..3c1a8a0aeb178e034c5d791a97560591d123b177 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1385,10 +1385,7 @@ commands = {
                    "<instances_file.json>",
                    "Create a bunch of instances based on specs in the file."),
   'console': (ConnectToInstanceConsole, ARGS_ONE_INSTANCE,
-              [DEBUG_OPT,
-               cli_option("--show-cmd", dest="show_command",
-                          action="store_true", default=False,
-                          help=("Show command instead of executing it"))],
+              [DEBUG_OPT, SHOWCMD_OPT],
               "[--show-cmd] <instance>",
               "Opens a console on the specified instance"),
   'failover': (FailoverInstance, ARGS_ONE_INSTANCE,