diff --git a/twander.py b/twander.py index 83e7a92..a0fff11 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.215 2007/01/08 18:04:33 tundra Exp $" +RCSID = "$Id: twander.py,v 3.216 2007/01/08 20:40:11 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -293,6 +293,7 @@ DEBUGLEVEL = 0 # No debug output DEFAULTSEP = "==>" # Default separator in PROMPT and YES definitions DOTFILE = '.' # Leading string of files suppressed by HIDEDOTFILES +EXPANDSYMLINKS = True # Expand symlink to show its target FORCEUNIXPATH = False # Force Unix path separators regardless of OS HIDEDOTFILES = False # Suppress display of files begining with DOTFILE INVERTFILTER = False # Invert wildcard filtering logic @@ -4276,6 +4277,16 @@ dotdot = [".." + PSEP,] + # If the user doesn't want symbolic link expansion, get + # rid of it. + + if not EXPANDSYMLINKS: + for list, tail in ((fList, ""), (dList, PSEP)): + for i in range(len(list)): + list[i] = list[i].split(SYMPTR)[0] + if tail and list[i][-1] != tail: + list[i] += tail + # Return the results # Entry to move up one directory is always first, # no matter what the sort. This is necessary because @@ -5345,6 +5356,7 @@ "AFTERCLEAR":AFTERCLEAR, "AUTOREFRESH":AUTOREFRESH, "CMDMENUSORT":CMDMENUSORT, + "EXPANDSYMLINKS":EXPANDSYMLINKS, "FORCEUNIXPATH":FORCEUNIXPATH, "HIDEDOTFILES":HIDEDOTFILES, "INVERTFILTER":INVERTFILTER,