screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: specifying a name for the logfile when using the -L option


From: bill
Subject: Re: specifying a name for the logfile when using the -L option
Date: Wed, 04 Jan 2006 19:31:43 +0000
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929)

Dan Huston wrote:

Is there a way to specify the name of the logfile that is created when using the -L option?

Here's a patch that makes -L take an optional argument.
(So %screen -L bash  will use "bash" as the base for the logfile,
but % screen -L - bash will use "screenlog" for the logfile
and will execute bash, while % screen -L bash -bash will
run bash and use "bash" as the basename.)
Common subdirectories: screen-4.0.2/doc and logfile_screen-4.0.2/doc
Common subdirectories: screen-4.0.2/etc and logfile_screen-4.0.2/etc
diff -u screen-4.0.2/screen.c logfile_screen-4.0.2/screen.c
--- screen-4.0.2/screen.c       2003-09-08 15:26:41.000000000 +0100
+++ logfile_screen-4.0.2/screen.c       2006-01-04 19:20:47.303872216 +0000
@@ -629,6 +629,12 @@
                  break;
                case 'L':
                  nwin_options.Lflag = 1;
+          if (av[1] && (av[1][0])!='-') {
+            char file_name[256];
+            snprintf(file_name, 256, "%s.%%n", *++av);
+            screenlogfile = SaveStr(file_name);
+            --ac;
+          }
                  break;
                case 'm':
                  mflag = 1;
Common subdirectories: screen-4.0.2/terminfo and logfile_screen-4.0.2/terminfo
Common subdirectories: screen-4.0.2/utf8encodings and 
logfile_screen-4.0.2/utf8encodings

reply via email to

[Prev in Thread] Current Thread [Next in Thread]