Fixed formatting problem so that -t and -Rdf actually work the same as documented.
1 parent 4dcb069 commit ebdf156a66eb0d4f4d155123a9ef74e60d4c7f57
@tundra tundra authored on 23 Jun 2001
Showing 1 changed file
View
7
tdir
import sys
 
# Version info
 
VERSION = "$Id: tdir,v 1.53 2001/06/24 01:29:15 tundra Exp $"
VERSION = "$Id: tdir,v 1.54 2001/06/24 01:35:50 tundra Exp $"
 
 
# Booleans
 
 
RECURSE = FALSE # No recursion
SHOWDIR = TRUE # Show directories in listing
SHOWFILE = TRUE # Show files in listing
TREE = FALSE # Don't just show the directory tree
 
 
def OrderByExtension(list):
ExtList = {}
ExtList[""] = [] # List of files with no extension
 
def DisplayOutput(dir, DirList, FileList):
sys.stdout.write(dir.replace("\\", "/") + ":" + "\n")
if not TREE:
if SHOWDIR or SHOWFILE :
sys.stdout.write("\n")
if len(DirList) > 0:
DirList.sort()
OutputColumns(DirList, TRUE)
if opt == "-t":
RECURSE = TRUE
SHOWDIR = FALSE
SHOWFILE = FALSE
TREE = TRUE
if opt == "-v":
sys.stdout.write(VERSION + "\n")
sys.exit(0)
if opt == "-w":