diff --git a/twander.1 b/twander.1 index 91100c6..8da22e0 100644 --- a/twander.1 +++ b/twander.1 @@ -858,7 +858,8 @@ [DSELECTION] is replaced with the fully-qualified path name of the item currently selected in the GUI. If more than one item is selected, [DSELECTION] refers to the last item -in the group. +in the group (the bottom-most, not the most recent item +you selected). .IP \(bu 4 .B [DSELECTIONS] @@ -928,10 +929,55 @@ A few other points about Built-In Variables are worth noting: .IP \(bu 4 -Any of the built-ins that return selections from the GUI will always -end a directory name with a path separator character ("/" or "\\") -appended at the end. This allows you to safely concatenate this -string with something else in your Command String. +Built-In Variables which return a directory name do +.B NOT +append a path separator character ("/" or "\\") to the end of the name +even though it is visible in the GUI. This provides maximum +flexibility when defining commands. It is up to the command author to +insert the appropriate path separator character where needed. (NOTE: +Earlier releases of \'twander\' +.B did +include the trailing path separator and you may have to edit +older configuration files accordingly. This change was necessary +because certain commands like Unix \'cp\' will not work if given +a source directory with the path separator included.) + + For example, another way to express the full path of the currently +selected item is: + +.nf +# Unix Path Separator +UPSEP = / + +#Win32 Path Separator +WPSEP = \\ + +[DIR][UPSEP][SELECTION] + +or + +[DIR][WPSEP][SELECTION] +.fi + +Be aware that, because of \'twander\' quoting rules, such constructs +will result in strings like: + +.nf +"/mydir"/"myfile" + +or + +"C:\\mydir"\\"myfile" +.fi + +This should not generally be a problem with the various Unix +shells, and may work for some Win32 commands. However, some +Win32 programs (noted on \'notepad\') reject this kind of +file name when passed on the command line. The workaround +(and a generally easier way to do this sort of thing), is to use +the [DSELECTION] built-in which returns the full path name of +an item as a single quoted string. + .IP \(bu 4 User-Defined and Environment Variables are processed