|
|
e9b926 |
diff -up expect5.45.4/expect.man.orig expect5.45.4/expect.man
|
|
|
e9b926 |
--- expect5.45.4/expect.man.orig 2018-08-29 10:43:24.112949065 +0200
|
|
|
e9b926 |
+++ expect5.45.4/expect.man 2018-08-29 10:45:47.652044587 +0200
|
|
|
e9b926 |
@@ -4,7 +4,7 @@ expect \- programmed dialogue with inter
|
|
|
e9b926 |
.SH SYNOPSIS
|
|
|
e9b926 |
.B expect
|
|
|
e9b926 |
[
|
|
|
e9b926 |
-.B \-dDinN
|
|
|
e9b926 |
+.B \-dDhinNv
|
|
|
e9b926 |
]
|
|
|
e9b926 |
[
|
|
|
e9b926 |
.B \-c
|
|
|
e9b926 |
@@ -180,6 +180,9 @@ problems when reading from a fifo or std
|
|
|
e9b926 |
If the string "\-" is supplied as a filename, standard input is read instead.
|
|
|
e9b926 |
(Use "./\-" to read from a file actually named "\-".)
|
|
|
e9b926 |
.PP
|
|
|
e9b926 |
+.B \-h
|
|
|
e9b926 |
+causes Expect to print its usage message and exit.
|
|
|
e9b926 |
+.PP
|
|
|
e9b926 |
The
|
|
|
e9b926 |
.B \-i
|
|
|
e9b926 |
flag causes
|
|
|
e9b926 |
diff -up expect5.45.4/exp_main_sub.c.orig expect5.45.4/exp_main_sub.c
|
|
|
e9b926 |
--- expect5.45.4/exp_main_sub.c.orig 2018-02-04 11:43:58.000000000 +0100
|
|
|
e9b926 |
+++ expect5.45.4/exp_main_sub.c 2018-08-29 11:04:44.307916140 +0200
|
|
|
e9b926 |
@@ -72,7 +72,21 @@ usage(interp)
|
|
|
e9b926 |
Tcl_Interp *interp;
|
|
|
e9b926 |
{
|
|
|
e9b926 |
char buffer [] = "exit 1";
|
|
|
e9b926 |
- expErrorLog("usage: expect [-div] [-c cmds] [[-f] cmdfile] [args]\r\n");
|
|
|
e9b926 |
+ expErrorLog("usage: expect [-dDhinNv] [-c cmds] [[-[f|b]] cmdfile] [args]\r\n"
|
|
|
e9b926 |
+ " Flags are as follows:\r\n"
|
|
|
e9b926 |
+ " -b prefaces a file from which to read commands from\r\n"
|
|
|
e9b926 |
+ " (expect reads one line at a timei from the file)\r\n"
|
|
|
e9b926 |
+ " -c prefaces a command to be executed before any in the script,\r\n"
|
|
|
e9b926 |
+ " may be used multiple times\r\n"
|
|
|
e9b926 |
+ " -d enables diagnostic output\r\n"
|
|
|
e9b926 |
+ " -D enables interactive debugger\r\n"
|
|
|
e9b926 |
+ " -f prefaces a file from which to read commands from\r\n"
|
|
|
e9b926 |
+ " (expect reads the whole file at once)\r\n"
|
|
|
e9b926 |
+ " -h prints this usage message and exits\r\n"
|
|
|
e9b926 |
+ " -i interactively prompts for commands\r\n"
|
|
|
e9b926 |
+ " -n expect doesn't read personal rc file\r\n"
|
|
|
e9b926 |
+ " -N expect doesn't read system-wide rc file\r\n"
|
|
|
e9b926 |
+ " -v prints version and exits\r\n");
|
|
|
e9b926 |
|
|
|
e9b926 |
/* SF #439042 -- Allow overide of "exit" by user / script
|
|
|
e9b926 |
*/
|
|
|
e9b926 |
@@ -700,7 +714,7 @@ char **argv;
|
|
|
e9b926 |
* and generate a usage message.
|
|
|
e9b926 |
*/
|
|
|
e9b926 |
|
|
|
e9b926 |
- while ((c = getopt(argc, argv, "+b:c:dD:f:inN-v")) != EOF) {
|
|
|
e9b926 |
+ while ((c = getopt(argc, argv, "+b:c:dD:f:inN-vh")) != EOF) {
|
|
|
e9b926 |
switch(c) {
|
|
|
e9b926 |
case '-':
|
|
|
e9b926 |
/* getopt already handles -- internally, however */
|
|
|
e9b926 |
@@ -768,6 +782,9 @@ char **argv;
|
|
|
e9b926 |
Tcl_Eval(interp, buffer);
|
|
|
e9b926 |
}
|
|
|
e9b926 |
break;
|
|
|
e9b926 |
+ case 'h':
|
|
|
e9b926 |
+ usage(interp);
|
|
|
e9b926 |
+ break;
|
|
|
e9b926 |
default: usage(interp);
|
|
|
e9b926 |
}
|
|
|
e9b926 |
}
|