From d33221de345f6ea513b8e32b452cd6e70cfcc556 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Wed, 18 Oct 2017 23:48:42 +0200 Subject: [PATCH] rc: allow colons as separator in $path and $cdpath --- sys/src/cmd/rc/jehanne.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/src/cmd/rc/jehanne.c b/sys/src/cmd/rc/jehanne.c index 2a1f692..4b2cdf8 100644 --- a/sys/src/cmd/rc/jehanne.c +++ b/sys/src/cmd/rc/jehanne.c @@ -144,6 +144,12 @@ Vinit(void) /* Charitably add a 0 at the end if need be */ if(buf[len-1]) buf[len++]='\0'; + if(strcmp(ENV_PATH, ent[i].name) == 0 + || strcmp(ENV_CDPATH, ent[i].name) == 0) + while(n-- > 0){ + if(buf[n] == ':') + buf[n] = '\0'; + } s = buf+len-1; for(;;){ while(s!=buf && s[-1]!='\0') --s;