From 1ffed22651478612f63d3abf31ee07798dec47e9 Mon Sep 17 00:00:00 2001
From: David-Sarah Hopwood <david-sarah@jacaranda.org>
Date: Thu, 1 Nov 2012 23:40:06 +0000
Subject: [PATCH] CLI: fix synopsis for 'tahoe ls'. fixes #1839

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
---
 src/allmydata/scripts/cli.py   | 5 +++++
 src/allmydata/test/test_cli.py | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/src/allmydata/scripts/cli.py b/src/allmydata/scripts/cli.py
index bb48ef4d..6758fe7d 100644
--- a/src/allmydata/scripts/cli.py
+++ b/src/allmydata/scripts/cli.py
@@ -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:
 
diff --git a/src/allmydata/test/test_cli.py b/src/allmydata/test/test_cli.py
index c2dad120..0edcd78a 100644
--- a/src/allmydata/test/test_cli.py
+++ b/src/allmydata/test/test_cli.py
@@ -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)
-- 
2.45.2