Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: leading '=' in enviroment variable truncated
- X-seq: zsh-workers 38432
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: leading '=' in enviroment variable truncated
- Date: Sun, 8 May 2016 13:24:06 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=LMZ7+nG1E2sx5yBXEJ3SzdheqsGhfY+JQnMDqZoGuUw=; b=geOBbZg60ZDlVrSyEh0Nv/qDdA+sVjMbOVQNCblRrA38Fp0JTTo62sUhZV1piRqQwr fiS4wHeId8uJEY0MU72syKEG3rLAuGp9zsp1xyIYf7KkLfqJjdscJbE0UBMBhmH6l5L6 Hf3YzA/jvsvd4NhROC5IZInzKuCSm6illG73Jv5tg0OpViR303EIIWuYCH7wms2AO59r klz6xnUUdpvDQRJB8IXmxg5MXxO15FfSfan1n2QP/YjyYqvFeR1UpGze5dObZwKS2Ieg CkIcDHX9UPTKgDJRk3tHIrG0fNMaA+W8jn8jKqQh79JONJB9kDPUXF8QYw18D1566pgm mkqQ==
- In-reply-to: <20160508201217.5924511a@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAEyFG7ZkxS9iuVtEoJT2aa_ErBm=Nm6JqkpSgt=-=3P-nuZBtg@mail.gmail.com> <160508105949.ZM9904@torch.brasslantern.com> <20160508201217.5924511a@ntlworld.com>
On May 8, 8:12pm, Peter Stephenson wrote:
} Subject: Re: leading '=' in enviroment variable truncated
}
} On Sun, 8 May 2016 10:59:49 -0700
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
}
} > As mentioned in the dotenv issue, this happens only on OSX. I've just
} > confirmed that it's a problem either with the library implementations
} > of setenv() / unsetenv(), or with zsh's use of them.
}
} These functions set, unset and fetch environment variables from the host
} environment list. For compatibility with differing environment
} conven-tions, conventions, the given arguments name and value may be
} appended and prepended, respectively, with an equal sign ``=''.
}
} Very useful, if I may say so.
Astounding.
The Open Group spec for "setenv" explicitly prohibits "=" in the name,
and says nothing about the value. The source code for setenv.c on
opensource.apple.com does nothing special with name or value.
How about this?
diff --git a/Src/zsh_system.h b/Src/zsh_system.h
index 811340d..17c4c64 100644
--- a/Src/zsh_system.h
+++ b/Src/zsh_system.h
@@ -728,7 +728,7 @@ extern char **environ;
* We always need setenv and unsetenv in pairs, because
* we don't know how to do memory management on the values set.
*/
-#if defined(HAVE_SETENV) && defined(HAVE_UNSETENV)
+#if defined(HAVE_SETENV) && defined(HAVE_UNSETENV) && !defined(__APPLE__)
# define USE_SET_UNSET_ENV
#endif
Messages sorted by:
Reverse Date,
Date,
Thread,
Author