CLI: fix synopsis for 'tahoe ls'. fixes #1839

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
This commit is contained in:
David-Sarah Hopwood 2012-11-01 23:40:06 +00:00
parent a77ae772f2
commit 1ffed22651
2 changed files with 9 additions and 0 deletions

View 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:

View 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)