You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2012/01/20 00:04:53 UTC

[2/6] git commit: add DESC alias for DESCRIBE

add DESC alias for DESCRIBE

patch by pcannon; reviewed by jbellis for CASSANDRA-3587


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fc610396
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fc610396
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fc610396

Branch: refs/heads/cassandra-1.0
Commit: fc6103966cbe90c96e75f4b52c10376b9df468d7
Parents: 95942f0
Author: paul cannon <pa...@datastax.com>
Authored: Thu Jan 19 12:02:13 2012 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jan 19 17:03:02 2012 -0600

----------------------------------------------------------------------
 bin/cqlsh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc610396/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 8fe044c..2a18722 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -116,6 +116,7 @@ cqlhandling.commands_end_with_newline.update((
     'help',
     '?',
     'describe',
+    'desc',
     'show',
     'assume',
     'eof',
@@ -134,7 +135,7 @@ cqlhandling.CqlRuleSet.append_rules(r'''
                    | <exitCommand>
                    ;
 
-<describeCommand> ::= "DESCRIBE" ( "KEYSPACE" ksname=<name>?
+<describeCommand> ::= ( "DESCRIBE" | "DESC" ) ( "KEYSPACE" ksname=<name>?
                                   | "COLUMNFAMILY" cfname=<name>
                                   | "COLUMNFAMILIES"
                                   | "SCHEMA"
@@ -741,6 +742,8 @@ class Shell(cmd.Cmd):
         """
         DESCRIBE [cqlsh only]
 
+        (DESC may be used as a shorthand.)
+
           Outputs information about the connected Cassandra cluster, or about
           the data stored on it. Use in one of the following ways:
 
@@ -798,6 +801,8 @@ class Shell(cmd.Cmd):
         elif what == 'schema':
             self.describe_schema()
 
+    do_desc = do_describe
+
     def do_show(self, parsed):
         """
         SHOW [cqlsh only]