[Tcsh] ~~ expansion broken again

Hans Rosenfeld rosenfeld at grumpf.hope-2000.org
Fri Jul 10 16:13:45 UTC 2020


Hi,

I just noticed that tcsh 6.22.02 tries to expand ~~ again, which
obviously fails:

> echo ~~
Unknown user: ~.
> tcsh --version
tcsh 6.22.02 (Astron) 2019-12-04 (amd64-sun-solaris) options wide,nls,dl,al,kan,sm,rh,color,filec

This was supposedly fixed back in 2017 after I reported this for the
first time. I've attached the patch from back then, it still applies
cleanly.


Hans


-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
-------------- next part --------------
--- sh.glob.c.orig	2016-08-01 18:21:09.000000000 +0000
+++ sh.glob.c	2017-04-05 12:54:37.623870649 +0000
@@ -78,6 +78,9 @@ globtilde(Char *s)
 {
     Char *name, *u, *home, *res;
 
+    if (s[1] == '~')
+	return s;
+
     u = s;
     for (s++; *s && *s != '/' && *s != ':'; s++)
 	continue;


More information about the Tcsh mailing list