diff --git a/tdir b/tdir index 715ce04..44e3f8e 100755 --- a/tdir +++ b/tdir @@ -13,7 +13,7 @@ # Version info -VERSION = "$Id: tdir,v 1.55 2001/06/24 19:00:24 tundra Exp $" +VERSION = "$Id: tdir,v 1.56 2001/06/27 02:02:44 tundra Exp $" # Booleans @@ -110,19 +110,27 @@ def Usage(): - sys.stdout.write("tdir - Copyright (c) 2001, TundraWare Inc., All Rights Reserved. \n\n") - sys.stdout.write(" usage: tdir [-Rdfhtv] [-c #] [-s c] [-w #] [dir...] where,\n\n") - sys.stdout.write(" -R Recurse down each named directory tree\n") - sys.stdout.write(" -c # Column width\n") - sys.stdout.write(" -d Do not display directories in output\n") - sys.stdout.write(" -f Do not display files in output\n") - sys.stdout.write(" -h Display this help information\n") - sys.stdout.write(" -s c Separator character\n") - sys.stdout.write(" -t Display only the directory tree - same as -Rdf\n") - sys.stdout.write(" -v Display tdir version information\n") - sys.stdout.write(" -w # Width of output\n") - sys.stdout.write(" dir... List of directories to display. Defaults to ./\n") + UsageInfo = ( + ("tdir - Copyright (c) 2001, TundraWare Inc., All Rights Reserved. \n", ""), + (" usage: tdir [-Rdfhtv] [-c #] [-s c] [-w #] [dir...] where,\n\n", ""), + ("-R", "Recurse down each named directory tree\n"), + ("-c #", "Column width\n"), + ("-d", "Do not display directories in output\n"), + ("-f", "Do not display files in output\n"), + ("-h", "Display this help information\n"), + ("-s c", "Separator character\n"), + ("-t", "Display only the directory tree - same as -Rdf\n"), + ("-v", "Display tdir version information\n"), + ("-w #", "Width of output\n"), + ("dir...", "List of directories to display. Defaults to ./\n") + ) + for x, y in UsageInfo: + if len(x) < 10: # Only indent for the actual argument info + sys.stdout.write(10 * PAD) + sys.stdout.write(x) + sys.stdout.write((8 - len(x)) * PAD) + sys.stdout.write(y) # Program entry and command line processing