Package: screen
Version: 4.0.2-4.1
Severity: wishlist
Tags: patch
Hi,
screen isn't able to handle ~/ if you want to load a
configuration file via source in the command line.
I hate this because it is short and good :)
However, I attached a patch which fixes this.
Please include it.
Regards Nico


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11.3
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) (ignored: 
LC_ALL set to [EMAIL PROTECTED])

Versions of packages screen depends on:
ii  base-passwd                 3.5.9        Debian base system master password
ii  debconf                     1.4.49       Debian configuration management sy
ii  libc6                       2.3.2.ds1-21 GNU C Library: Shared libraries an
ii  libncursesw5                5.4-4        Shared libraries for terminal hand
ii  libpam0g                    0.76-22      Pluggable Authentication Modules l
ii  passwd                      1:4.0.3-32   change and administer password and

-- debconf information:
  screen/old_upgrade_prompt: false

-- 
Nico Golde - [EMAIL PROTECTED] | GPG: 1024D/73647CFF
http://www.ngolde.de | http://www.muttng.org | http://grml.org 
VIM has two modes - the one in which it beeps 
and the one in which it doesn't -- encrypted mail preferred
--- fileio.c    2003-09-08 16:25:28.000000000 +0200
+++ /home/nion/tar_deb/screen-4.0.2/fileio.c    2005-05-12 16:50:21.000000000 
+0200
@@ -2,6 +2,8 @@
  *      Juergen Weigert ([EMAIL PROTECTED])
  *      Michael Schroeder ([EMAIL PROTECTED])
  * Copyright (c) 1987 Oliver Laumann
+ * A part for the configuration file loading was written by
+ * Nico Golde <[EMAIL PROTECTED]>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -291,13 +293,23 @@
 do_source(rcfilename)
 char *rcfilename;
 {
+  char *tmp_file, *tmp_rcname;
   if (rc_recursion > 10)
     {
       Msg(0, "%s: source: recursion limit reached", rc_name);
       return;
     }
   rc_recursion++;
-  FinishRc(rcfilename);
+  if (rcfilename[0]=='~' && rcfilename[1]=='/')
+  {
+    tmp_file=getenv("HOME");
+    strncat(tmp_file,"/",1);
+    tmp_rcname=strtok(rcfilename,"~/");
+    strncat(tmp_file,tmp_rcname, strlen(tmp_rcname));
+    FinishRc(tmp_file);
+  }
+  else
+    FinishRc(rcfilename);
   rc_recursion--;
 }
 

Attachment: signature.asc
Description: Digital signature

Reply via email to