]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
CLI: fix synopsis for 'tahoe ls'. fixes #1839
authorDavid-Sarah Hopwood <david-sarah@jacaranda.org>
Thu, 1 Nov 2012 23:40:06 +0000 (23:40 +0000)
committerDavid-Sarah Hopwood <david-sarah@jacaranda.org>
Thu, 1 Nov 2012 23:40:06 +0000 (23:40 +0000)
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
src/allmydata/scripts/cli.py
src/allmydata/test/test_cli.py

index bb48ef4d0fe732a65c6b8e22fec9380b24034477..6758fe7d7b6e36f7c04339a13694987fcae77cfc 100644 (file)
@@ -106,9 +106,14 @@ class ListOptions(VDriveOptions):
     def parseArgs(self, where=""):
         self.where = argv_to_unicode(where)
 
+    def getSynopsis(self):
+        return "Usage:  %s ls [options] [PATH]" % (self.command_name,)
+
     longdesc = """
     List the contents of some portion of the grid.
 
+    If PATH is omitted, "tahoe:" is assumed.
+
     When the -l or --long option is used, each line is shown in the
     following format:
 
index c2dad120772227d6b63d8a24672e8352f1405078..0edcd78a4f110f071c5fe805b1f315817b1d7596 100644 (file)
@@ -594,6 +594,10 @@ class Help(unittest.TestCase):
         self.failUnlessIn(" put [options] LOCAL_FILE REMOTE_FILE", help)
         self.failUnlessIn("% cat FILE | tahoe put", help)
 
+    def test_ls(self):
+        help = str(cli.ListOptions())
+        self.failUnlessIn(" ls [options] [PATH]", help)
+
     def test_unlink(self):
         help = str(cli.UnlinkOptions())
         self.failUnlessIn(" unlink [options] REMOTE_FILE", help)