diff --git a/twander.py b/twander.py index c463450..83e7a92 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.214 2007/01/08 17:36:14 tundra Exp $" +RCSID = "$Id: twander.py,v 3.215 2007/01/08 18:04:33 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -283,36 +283,37 @@ # Defaults ##### -ACTUALLENGTH = False # Show actual file lengths -ADAPTREFRESH = True # Dynamically adjust refresh intervals -AFTERCLEAR = True # Clear all selections following REFRESHAFTER -AFTERWAIT = 1 # Seconds to wait before REFRESHAFTER -AUTOREFRESH = True # Automatically refresh the directory display? -CMDMENUSORT = False # Sort the command menu? -CMDSHELL = "" # No CMDSHELL processing -DEBUGLEVEL = 0 # No debug output -DEFAULTSEP = "==>" # Default separator in PROMPT and YES definitions -DOTFILE = '.' # Leading string of files suppressed by HIDEDOTFILES -FORCEUNIXPATH = False # Force Unix path separators regardless of OS -HIDEDOTFILES = False # Suppress display of files begining with DOTFILE -INVERTFILTER = False # Invert wildcard filtering logic -ISODATE = False # Display date/time in ISO 8601 Format -MAXMENU = 32 # Maximum length of displayed menu -MAXMENUBUF = 250 # Maximum size of internal menu buffer -MAXNESTING = 32 # Maximum depth of nested variable definitions -NODETAILS = False # True means details can never be displayed -NONAVIGATE = False # True means that all directory navigation is prevented -REFRESHINT = 5000 # Interval (ms) for automatic refresh -QUOTECHAR = '\"' # Character to use when quoting Built-In Variables -SORTBYFIELD = "Name" # Field to use as sort key -SORTREVERSE = False # Reverse specified sort order? -SORTSEPARATE = True # Separate Directories and Files in sorted displays? -SYMDIR = True # Sort symlinks pointing to directories as directories -USETHREADS = False # Use threads on Unix? -USEWIN32ALL = True # Use win32all features if available? -WARN = True # Warnings on? -WILDNOCASE = False # Turns on case-insensitive wildcard matching -WIN32ALLON = True # Flag for toggling win32all features while running +ACTUALLENGTH = False # Show actual file lengths +ADAPTREFRESH = True # Dynamically adjust refresh intervals +AFTERCLEAR = True # Clear all selections following REFRESHAFTER +AFTERWAIT = 1 # Seconds to wait before REFRESHAFTER +AUTOREFRESH = True # Automatically refresh the directory display? +CMDMENUSORT = False # Sort the command menu? +CMDSHELL = "" # No CMDSHELL processing +DEBUGLEVEL = 0 # No debug output +DEFAULTSEP = "==>" # Default separator in PROMPT and YES definitions +DOTFILE = '.' # Leading string of files suppressed by HIDEDOTFILES +FORCEUNIXPATH = False # Force Unix path separators regardless of OS +HIDEDOTFILES = False # Suppress display of files begining with DOTFILE +INVERTFILTER = False # Invert wildcard filtering logic +ISODATE = False # Display date/time in ISO 8601 Format +MAXMENU = 32 # Maximum length of displayed menu +MAXMENUBUF = 250 # Maximum size of internal menu buffer +MAXNESTING = 32 # Maximum depth of nested variable definitions +NODETAILS = False # True means details can never be displayed +NONAVIGATE = False # True means that all directory navigation is prevented +QUOTECHAR = '\"' # Character to use when quoting Built-In Variables +REFRESHINT = 5000 # Interval (ms) for automatic refresh +RESOLVSYMLINKS = False # Show absolute path of symlink target +SORTBYFIELD = "Name" # Field to use as sort key +SORTREVERSE = False # Reverse specified sort order? +SORTSEPARATE = True # Separate Directories and Files in sorted displays? +SYMDIR = True # Sort symlinks pointing to directories as directories +USETHREADS = False # Use threads on Unix? +USEWIN32ALL = True # Use win32all features if available? +WARN = True # Warnings on? +WILDNOCASE = False # Turns on case-insensitive wildcard matching +WIN32ALLON = True # Flag for toggling win32all features while running # Wildcards are case-insensitive on Win32 by default @@ -4682,10 +4683,17 @@ # Include symlink details as necessary if details[0] == 'l': + # Symlink targets can be displayed as defined (default) + # or expanded to their absolute path string. + + if RESOLVSYMLINKS: + f = os.path.realpath(currentdir + name) + else: + f = os.readlink(currentdir + name) + # Strip trailing path separator # This will be handled by the caller - f = os.readlink(currentdir + name) if f[-1] == PSEP: f = f[:-1] @@ -5343,6 +5351,7 @@ "ISODATE":ISODATE, "NODETAILS":NODETAILS, "NONAVIGATE":NONAVIGATE, + "RESOLVSYMLINKS":RESOLVSYMLINKS, "SORTREVERSE":SORTREVERSE, "SORTSEPARATE":SORTSEPARATE, "SYMDIR":SYMDIR,