diff --git a/twander.1 b/twander.1 index 6606d6c..223d11c 100644 --- a/twander.1 +++ b/twander.1 @@ -69,6 +69,18 @@ functions: .TP +.B Arrow Keys and Spacebar +The Left- and Right-Arrow keys are used for horizontal scrolling, +if needed. The Up- and Down-Arrow keys move up and down through +the currently displayed directory listing. Pressing the Spacebar +will cause the currently underlined item to be selected just as +if you had clicked on it. + +.TP +.B Backspace +Moves up one directory ("..") in the filesystem hierarchy + +.TP .B Esc Exit \'twander\' @@ -76,6 +88,10 @@ .B Home Return to the original starting directory +.TP +.B XXXXXXX FIX ME Left Arrow +Move back to last viewed directory + .SH CONFIGURATION FILE FORMAT \'twander\' @@ -134,28 +150,6 @@ [DIRECTORY] is replaced with the current directory name (ending with a path separator character). -If one of these special symbols is used at the end of a line which is -quoted, be sure to leave a space between the symbol and the -terminating quote or \'twander\' will not recognize the special -symbol: - -.nf - -# This is OK -some-command "arg1 arg2 [FILE] " - -# This is NOT OK -some-command "arg1 arg2 [FILE]" - -.fi - -This is required because \'twander\' expects whitespace separators -between the various kinds of configuration file entries (literals, -environment variables, [FILE], and [DIRECTORY]. It thus parses -[FILE]" in our example as -.B literal text -since the closing double-quote appears to be part of the string. - Here is an example .twander file: .nf @@ -193,6 +187,94 @@ This is an intentional design choice to force the creation of sane and meaningful configuration files. +.SH GOTCHAS + +There are several tricky corners of \'twander\' which need +further explanation: + +.B 1) Quoting Environment Variables In A Configuration Entry + +For various reasons, it is sometimes necessary to put an environment +variable reference inside of a quoted string. In this case, you will +need a space between the reference and the trailing quote or +\'twander\' will not recognize it: + +.nf +# This is OK +some-command "arg1 arg2 | $PAGER " + + +# This is NOT OK +some-command "arg1 arg2 | $PAGER" +.fi + +The \'twander\' configuration language is not as powerful +as a full blown command shell, and it needs the trailing +space to know the true name of the environment variable. + +.B 2) Getting Command Results Displayed In A New Window + +When you invoke a command via \'twander\', you generally want +it to run in a new window. If the program you are running +is GUI-aware, this should not be a problem. However, if you +are using \'twander\' to run a command line program or script, +you have to take extra care in the formulation of the configuration +file entry. In the case of Unix-like systems you have to invoke +the command so that it runs in some GUI context. Say you want +to use a pager like \'less\' to view files. You would expect +that this entry might do it: + +&View less [FILE] & + +Sadly, this will not work, at least not the way you expect. +If you started \'twander\' from a terminal session and use +the command above, it will work, but the results will appear +in the invoking terminal window, +.B not +in a new window as you might expect. If you started \'twander\' +from a GUI or disconnected it from the initating terminal with +a \'nohup\' ... & invocation, you will get +.B no +output. This is not a \'twander\' problem, it is innate to +how command line programs run under shell control. To achieve +the desired results, you'll need something like this in your +configuration file: + +.nf +&View xterm -fn 9x15 -e $PAGER [FILE] & +.fi + +This causes your command line program to execute in an \'xterm\' +context. + +Note also that the command ends with \'&\'. If you do not have +this, \'twander\' will execute the command of interest and +hang waiting until the command completes. This so-called +"modal" operation may be useful sometimes, but usually it is +not what you want. + +For Win32, the issue is a bit simpler. Just make sure that you +run \'twander\' with the \'pythonw\' version of the python +binary. This version is specifically intended for running +Python programs with no controlling command line window open. +In this case, our example looks like: + +.nf +&view cmd /c " less [FILE] " +.fi + +.B 3) File- Or Directory Names Which Contain Whitespace + +[FILE] and [DIRECTORY] faithfully return the name of the item you +select, whitespace and all. The shells of some operating systems, +notably the Unix-like systems (FreeBSD, Linux...), require +special handling for this sort of thing. Here is our example +again, with this taken into account: + + +.nf +&View xterm -e bash -c ' cat "[FILE]" | less ' & +.fi .SH OTHER You must have \'python\' 2.2 or later installed as well as Tkinter @@ -206,9 +288,11 @@ If you enter something unreasonable for these options, \'twander\' will refuse to run with some .B really -interesting and entertaining error messages. +interesting and entertaining error messages. The program could be +more gracious about this. -The program could be more gracious about this. +This program has not been tested on MacOS. Please let me know how/if +it works there and any issues you discover. .SH COPYRIGHT AND LICENSING \'twander\' is Copyright(c) 2002 TundraWare Inc. For terms of use, see @@ -219,5 +303,5 @@ .SH AUTHOR .nf Tim Daneliuk -tundra@tundraware.com +twander@tundraware.com