diff --git a/twander.1 b/twander.1 index 64d84fa..ebecfc7 100644 --- a/twander.1 +++ b/twander.1 @@ -441,7 +441,7 @@ This is a shortcut that allows you to directly move to a new directory/path - i.e., Without having to navigate to it. -Unless you have set the MAXDIR option to 0, CHANGEDIR keeps track of +Unless you have set the MAXMENU option to 0, CHANGEDIR keeps track of your last manually entered directory and presents it as a default when you press CHANGEDIR again. You can then move to that directory, edit the string to specify another directory, or delete it and enter an @@ -779,7 +779,7 @@ [$EDITOR] [SELECTIONS] .fi -Unless you have set the MAXHIST option to 0, RUNCMD keeps track of +Unless you have set the MAXMENU option to 0, RUNCMD keeps track of your last manually entered command and presents it as a default when you press RUNCMD again. You can then run the command again exactly as you last entered it, you can modify it before running the command @@ -914,12 +914,17 @@ convenient to use. These menus appear at the top of the \*(TW display window, above the directory listing. +.SS Invoking A Menu + A menu can be invoked in one of several ways. You can click on it, you can press its associated "Accelerator Key" combination, or you can use the "Mouse Shortcut" to cause a copy of the menu to pop-up near the mouse pointer. The Accelerator Keys are shown in parenthesis next to the menu names below and the Mouse Shortcuts are -similarly shown below in square brackets. +similarly shown below in square brackets. All menus have Accelerator Keys +defined, but only some menus have associated Mouse Shortcuts. + +.SS Detaching A Menu The first item in each menu is a dashed line ("----") which indicates that it is a "tearoff" menu. Clicking on the dashed line will detach @@ -929,13 +934,44 @@ instances of these menus if you'd like copies of them at several locations on the screen simultaneously. -On Win32 systems, if a menu gets too long to physically fit on screen, -up- and down- scrolling arrows automatically appear at the top- and -bottom of the menu respectively. This is not a feature of the Unix Tk -implementation, so menus which grow too large are simply truncated to -fit the screen on Unix-like systems. As described in the following -paragraphs, \*(TW provides some options to limit the size of the -Directory and History menus for this reason. + +.SS Managing The Size Of Dynamic Menus + +A number of these menus have "dynamic" content - their content changes +as the program runs. For example, the Directory, History, and +Wildcard menus all keep some sort of "history" of what the program has +done. Their content thus grows longer as the program is used. + +On Win32 systems, if such menus grow too long to physically fit on +screen, up- and down- scrolling arrows automatically appear at the +top- and bottom of the menu respectively. This is not a feature of +the Unix Tk implementation, so menus which grow too large are simply +truncated to fit the screen on Unix-like systems. + +There are two User-Settable Options options available to help you manage +the maximum size of dynamic menus (see the section below on the \*(CF +which explains how such options are actually set. The MAXMENU option +specifies the maximum number entries +.B we will be displayed +in any dynamic menu. (\*(TW internally tracks MAXMENUBUF number of +items for each dynamic menu.) This defaults to 32 as is intended as a +way to keep the menu size reasonable. + +If you set MAXMENU=0, it means you are +.B disabling +all dynamic menus. It also means that no interactive dialog will +"remember" your last manual entry. For example, with MAXMENU set to +0, \*(TW will not keep track of your last manual entries for the +CHANGEDIR, SELWILD, and RUNCMD dialogs. + +MAXMENUBUF specifies the size of the internal storage buffer for each +dynamic menu regardless of how many entries are actually displayed. +i.e. MAXMENUBUF determines how many dynamic events each menu tracks +internally regardless of how many are actually visible in the menu at +any moment in time. It defaults to 250 and probably never needs to be +changed. If you set MAXMENUBUF to be less than MAXMENU, then this +smaller value will determine the maximum size of the displayed menu. +Setting MAXMENUBUF to 0 is equivalent to setting MAXMENU to 0. .SS Commands Menu (Alt-c) [Right-Mouse-Button] @@ -969,26 +1005,12 @@ navigate to it again, back up to it, or name it explictly using the Change Directory command. -There are two user-settable options associated with the Directory -Menu. MAXDIR specifies the maximum number of visited directories -to -.B display in the menu. -This defaults to 32 as is intended as a way to keep the menu -size reasonable. If you set MAXDIR=0, it means you are -disabling this menu feature altogether as well as disabling -the tracking of the last manually entered directory via -the CHANGEDIR key. (default: Control-x) - -MAXDIRBUF specifies how many directories \*(TW keeps track -of internally, no matter how many are actually displayed. It defaults -to 250. - -In summary, the Directory Menu shows the last MAXDIR directories -visited in alphabetically sorted order (unless you change MAXDIRBUF to -be smaller than MAXDIR). "Visited", in this case, is stretching things -a bit. All Directory Shortcut locations are also preloaded into the -Directory Menu when the program starts even though they have not yet -actually been visited. +Unless MAXMENU is set to 0, the Directory Menu shows the last MAXMENU +directories visited in alphabetically sorted order (unless you change +MAXMENUBUF to be smaller than MAXMENU). "Visited", in this case, is +stretching things a bit. All Directory Shortcut locations are also +preloaded into the Directory Menu when the program starts even though +they have not yet actually been visited. The Directory Menu is emptied and grayed out when you press the CLRHIST key. (default: Control-y) @@ -1006,21 +1028,7 @@ a dialog box is opened, giving you an opportunity to edit the command before running it again. -There are two user-settable options associated with the History -Menu. MAXHIST specifies the maximum number of previously run commands -to -.B display in the menu. -This defaults to 32 as is intended as a way to keep the menu -size reasonable. If you set MAXHIST=0, it means you are -disabling this menu feature altogether as well as disabling -the tracking of the last manually entered command via -the RUNCMD key. - -MAXHISTBUF specifies how many previously-run commands \*(TW -keeps track of internally, no matter how many are actually displayed. -It defaults to 250. - -One other point of clarification is in order here. If you run +One important point of clarification is in order here. If you run one of the commands defined in your \*(CF, it is stored in the History .B after all variable substitutions have been made. @@ -1266,7 +1274,7 @@ Selects the main display Background Color. .TP -.B CMDSHELL [String] ("") +.B CMDSHELL [String] () This option is primarily intended for people running \*(TW on Unix-like operating systems like FreeBSD and Linux. As described in @@ -1327,18 +1335,17 @@ .B permanently, just remove the statement above from your \*(CF. If you want to leave it in as a placeholder, but deactivate CMDSHELL, use the -following statement (since the RHS of a string variable cannot be -blank): +following statement: .nf -CMDSHELL = "" +CMDSHELL = .fi You also may want to occasionally use RUNCMD to do something without CMDSHELL processing, even though that feature has been defined in the \*(CF. You can disable CMDSHELL operation on a per-RUNCMD basis. Just begin your entering your command with the -backslash (\\) character. \*(TW understands this to "escape" +double-quote (") character. \*(TW understands this to "escape" CMDSHELL processing. As a general matter, CMDSHELL allows you to prepend @@ -1417,34 +1424,19 @@ This selects the help menu Font Weight. .TP -.B MAXDIR [Numeric] (32) +.B MAXMENU [Numeric] (32) Maximum number of entries to .B display -in the Directory Menu. This keeps the menu size reasonable. +in any dynamic menu. This keeps the menu size reasonable. Internally, \*(TW keeps track of way more than this -number of directories (see the MAXDIRBUF option below). +number of dynamic entiries (see the MAXMENUBUF option below). .TP -.B MAXDIRBUF [Numeric] (250) -Maximum number of visited directories \*(TW -.B tracks internally. -This value need normally not be changed. It is present only -to bound how much memory \*(TW consumes for this task. - -.TP -.B MAXHIST [Numeric] (32) - -Maximum number of entries to -.B display -in the History Menu. This keeps the menu size reasonable. -Internally, \*(TW keeps track of way more than this -number of commands (see the MAXHISTBUF option below). - -.TP -.B MAXHISTBUF [Numeric] (250) -Maximum number of commands executed \*(TW -.B tracks internally. +.B MAXMENUBUF [Numeric] (250) +Maximum number of items \*(TW +.B tracks internally +for each dynamic menu. This value need normally not be changed. It is present only to bound how much memory \*(TW consumes for this task. @@ -1731,27 +1723,25 @@ fonts will cause your display to be ragged and hard to read. .IP \(bu 4 -If you set MAXDIR or MAXDIRBUF to 0, it disables both the tracking of -visited directories and the retention of last manually entered -directory with CHANGEDIR. (default: Control-x) +If you set MAXMENU or MAXMENUBUF to 0, it disables both dynamic menu +content +.B and +of the last manual entry in the dialogs associated with CHANGEDIR +(default: Control-x), SELWILD (default: Control-\\), and RUNCMD +(default: Control-z). .IP \(bu 4 -Similarly if you set MAXHIST or MAXHISTBUF to 0, you disable both -command history and the retention of the last manually entered command -via RUNCMD. (default: Control-z) - -.IP \(bu 4 -Changing either MAXDIR or MAXHIST and then reloading the Configuration -File only changes -.B the number of items visible on their respective menus. +Changing MAXMENU and then reloading the Configuration File only +changes +.B the number of items visible on the various dynamic menus. \*(TW actually keeps track of more than this internally -(governed by the MAXDIRBUF and MAXHISTBUF options). +(governed by the MAXMENUBUF option). -Say MAXDIR and MAXHIST are set to 4, but you've actually visited 20 -different directories and issued 30 commands. You'll only see 4 of -each. But, if you edit MAXDIR and MAXHIST to now be 32 and reload the -\*(CF, you will see all 20 directories and 30 commands on -their respective menus. +Say MAXMENU is set to 4, but you've actually visited 20 different +directories and issued 30 commands. You'll only see 4 of each on the +associated menus. But, if you edit MAXMENU to now be 32 and reload +the \*(CF, you will see all 20 directories and 30 commands on their +respective menus. .IP \(bu 4 At first glance, the ability to set QUOTECHAR to any arbitary string @@ -2179,12 +2169,24 @@ of a variable name. So, for example, MY$VAR is fine. .IP \(bu 4 -Variable Names may not be redefined. This means you can only define a -given Variable Name once per \*(CF. It is also -considered a variable redefinition if you try to use a variable name -which matches either one of the Built-In Variables (used in Command -Definitions) or one of the Program Function Names (used for Key -Bindings). +Unlike previous versions of \*(TW, Variable Names may be redefined. +This makes it more convenient to exploit the ability for \*(TW +to process the contents of a \*(CF conditionally (see the section +below entitled, "Conditional Processing"). + +For example, you can set a variable to some default +value, and then override it if a condition is satisfied: + +.nf +# Assume we're running on a Unix-like system + +MyEditor = [$EDITOR] + +# Override this if we're on Win32 + +\&.if [.OS] == nt + MyEditor = write +\&.endif .SS Command Definitions @@ -2599,14 +2601,14 @@ .fi .IP \(bu 4 -A top-level "Drive List View" is enabled if \*(W3 is installed. -This shows you a list of all currently available drives reachable by -the system, and information about those drives. For locally attached +A top-level "Drive List View" is enabled if \*(W3 is installed. This +shows you a list of all currently available drives reachable by the +system, and information about those drives. For locally attached drives, the drive label is shown. For network-attached drives, the share string is shown. The drive type (CD/DVD, Fixed, Ramdisk, -Remote, Removable) is shown as are the free/total space statistics. -As is the case with other \*(TW displays, these details can be -toggled on- and off via the TOGDETAIL key. +Remote, Removable) is shown as are the free, and total space +statistics. As is the case with other \*(TW displays, these details +can be toggled on- and off via the TOGDETAIL key. You can enter the Drive List View in a number of ways: