diff --git a/twander.py b/twander.py index 2d25c7a..31fab43 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ PROGNAME = "twander" -RCSID = "$Id: twander.py,v 1.64 2002/11/19 10:06:07 tundra Exp $" +RCSID = "$Id: twander.py,v 1.65 2002/11/19 10:21:23 tundra Exp $" VERSION = RCSID.split()[2] @@ -509,8 +509,14 @@ # Otherwise, replace config tokens with actual file/dir names if cmd: + # Handle selections in form: /foo/bar/[....] + + cursel = UI.CurrentSelection() + if cursel[0] == DIR_LDELIM and cursel[-1] == DIR_RDELIM: + cursel = cursel[1:-1] + PSEP + # Replace runtime-determined tokens - cmd = cmd.replace(FILENAME, UI.CurrentSelection()) + cmd = cmd.replace(FILENAME, cursel) cmd = cmd.replace(DIRNAME, UI.CurrentDir) # Actually execute the command