From 8d5cc756f02bc5a14d175b2f424a6d402d3ba47a Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 25 Jun 2009 16:57:51 -0700 Subject: [PATCH] cli: add some --help text to 'tahoe cp' --- src/allmydata/scripts/cli.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/allmydata/scripts/cli.py b/src/allmydata/scripts/cli.py index e65196c6..7c946ae2 100644 --- a/src/allmydata/scripts/cli.py +++ b/src/allmydata/scripts/cli.py @@ -178,6 +178,26 @@ class CpOptions(VDriveOptions): raise usage.UsageError("cp requires at least two arguments") self.sources = args[:-1] self.destination = args[-1] + def getSynopsis(self): + return "Usage: tahoe [options] cp FROM.. TO" + longdesc = """ + Use 'tahoe cp' to copy files between a local filesystem and a Tahoe + virtual filesystem. Any FROM/TO arguments that begin with an alias + indicate Tahoe-side files, and arguments which do not indicate local + files. Directories will be copied recursively. New Tahoe-side directories + will be created when necessary. Assuming that you have previously set up + an alias 'home' with 'tahoe create-alias home', here are some examples: + + tahoe cp ~/foo.txt home: # creates tahoe-side home:foo.txt + + tahoe cp ~/foo.txt /tmp/bar.txt home: # copies two files to home: + + tahoe cp ~/Pictures home:stuff/my-pictures # copies recursively + + Limitations: symlinks, special files (device nodes, named pipes), and + non-ASCII filenames are not handled very well. Arguments should not have + trailing slashes. 'tahoe cp' does not behave exactly like /bin/cp . + """ class RmOptions(VDriveOptions): def parseArgs(self, where): -- 2.45.2