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

-- 
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: pgpInvzsDQgT6.pgp
Description: PGP signature

_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to