diff --git a/twander.1 b/twander.1 index d0e6008..aa5b4fd 100644 --- a/twander.1 +++ b/twander.1 @@ -96,7 +96,7 @@ 5 0x020 Dump Directory Stack As It Changes 6 0x040 Dump Command History Stack After Command Executes 7 0x080 Dump Contents Of Program Memories As They Change - 8 0x100 Dump Contents Of Wildcard Stack As It Changes + 8 0x100 Dump Contents Of Filter/Selection Wildcard Lists As They Change (0x100) 9 0x200 Reserved/Unused 10 0x400 Reserved/Unused 11 0x800 Dump Requested Debug Information And Exit Immediately @@ -283,7 +283,7 @@ There are several features of \'twander\' that will present the user a text entry dialog. These include the CHANGEDIR and RUNCMD features as -well as the [PROMPT:...] Built-In Variable (all described below). +well as the {PROMPT:...} Built-In Variable (all described below). Any time you are entering text in such a dialog, be aware that the text can be edited several ways - You can edit it using the @@ -2901,7 +2901,10 @@ .SS Prompting And Special-Purpose Built-Ins There are also several special-purpose Built-In Variables which are used -for creating more powerful Command Definitions: +for creating more powerful Command Definitions. + +.B Note: +The PROMPT and YESNO Built-Ins use {} as delimiters, not []. .IP \(bu 4 .B [HASH] @@ -2917,9 +2920,9 @@ or how the QUOTECHAR Program Option is defined). .IP \(bu 4 -.B [PROMPT:Prompt-String] +.B {PROMPT:Prompt-String==>default} -[PROMPT:...] allows you to insert an interactive prompt for the user +{PROMPT:...} allows you to insert an interactive prompt for the user anywhere you'd like in a Command String. The user is prompted with the "Prompt String" and this variable is replaced with their response. If they respond with nothing, it is interpreted as an @@ -2935,17 +2938,36 @@ Win32Copy = copy # Unix Version - c UnixCP [UnixCopy] [DSELECTIONS] [PROMPT:Enter Destination] + c UnixCP [UnixCopy] [DSELECTIONS] {PROMPT:Enter Destination} # Win32 Version - C Win32CP [Win32Copy] [DSELECTIONS] [PROMPT:Enter Destination] + C Win32CP [Win32Copy] [DSELECTIONS] {PROMPT:Enter Destination} .fi .ft \" revert -.IP \(bu 4 -.B [YESNO:Question-String] +You can also provide a default response to the question. The prompt +is separated from the default by the \'==>\' string. This default +separator string can be changed to anything you like with the +DEFAULTSEP option. -[YESNO:...] allows you to prompt the user with a dialog containing a +This feature is useful when you want to provide the user the most-likely +response to the prompt: + +.ft C \" courier +.nf + c UnixCP [UnixCopy] [DSELECTIONS] {PROMPT:Enter Destination==>/my/home/dir} +.fi +.ft \" revert + +When the prompt is presented to the user, the default value is +pre-loaded into the response field. The user can either accept or +edit that string. + + +.IP \(bu 4 +.B {YESNO:Question-String==>Yes|No} + +{YESNO:...} allows you to prompt the user with a dialog containing a Yes/No question and buttons for their response. If the user presses "Yes", command interpretation/execution continues. If the user presses "No", the command is aborted. This is handy when you want to @@ -2956,10 +2978,26 @@ .ft C \" courier .nf - D BigDelete [YESNO:Are You Absolutely Sure About This?] rm -rf [SELECTIONS] + D BigDelete {YESNO:Are You Absolutely Sure About This?} rm -rf [SELECTIONS] .fi .ft \" revert +You can also provide a default response to the question. It must be +either "Yes" or "No" (case-insensitive). Anything else will produce +an error. The prompt is separated from the default by the \'==>\' +string. This default separator string can be changed to anything you +like with the DEFAULTSEP option. + +This feature is handy because you can pre-select the most likely +response to the dialog: + +.ft C \" courier +.nf + D BigDelete {YESNO:Are You Absolutely Sure About This?==>No} rm -rf [SELECTIONS] +.fi +.ft \" revert + + .SS Program Memory Built-Ins As described previously, \'twander\' implements an advanced notion of @@ -3065,7 +3103,7 @@ .ft C \" courier .nf - g gencopy cp -R [PROMPT:Enter Source] [PROMPT:Enter Destination] + g gencopy cp -R {PROMPT:Enter Source} {PROMPT:Enter Destination} .fi .ft \" revert @@ -3628,14 +3666,14 @@ .SS Using Shell Wildcards In Command Definitions -The [PROMPT:...] Built-In Variable is provided to make +The {PROMPT:...} Built-In Variable is provided to make it possible to write general-purpose commands which interact with the user. For example, you might want to define a directory listing command for Windows like this: .ft C \" courier .nf - L DirList dir [PROMPT:Directory Of What?] | more + L DirList dir {PROMPT:Directory Of What?} | more .fi .ft \" revert @@ -3649,7 +3687,7 @@ .ft C \" courier .nf - L DirList [VSHELL] 'ls -l [PROMPT:Directory Of What?] | [$PAGER]' + L DirList [VSHELL] 'ls -l {PROMPT:Directory Of What?} | [$PAGER]' .fi .ft \" revert @@ -3697,12 +3735,12 @@ .ft C \" courier .nf - L DirList [VSHELL] 'UsrResp=[PROMPT:Directory Of What?] ; ls -l $UsrResp | [$PAGER]' + L DirList [VSHELL] 'UsrResp={PROMPT:Directory Of What?} ; ls -l $UsrResp | [$PAGER]' .fi .ft \" revert Why does this work? Because the shell interprets (and drops) the double-quotes, -when the results of the [PROMPT:...] are +when the results of the {PROMPT:...} are .B assigned to "UsrResp". The later reference to "$UsrResp" returns just the string the user entered without the quotes and the command works as expected. @@ -3712,7 +3750,7 @@ you enter is .B not part of a Built-In Variable substitution, so it is not quoted. (The -exception, of course, would be if you entered a [PROMPT:...] reference +exception, of course, would be if you entered a {PROMPT:...} reference in the RUNCMD dialog. In this case, the same problem we've just described could occur.) @@ -4290,4 +4328,4 @@ .ft \" revert .SH DOCUMENT REVISION INFORMATION -$Id: twander.1,v 1.114 2005/01/21 21:07:25 tundra Exp $ \ No newline at end of file +$Id: twander.1,v 1.115 2005/02/02 10:51:16 tundra Exp $ \ No newline at end of file