Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: TMPDIR vs TMPPREFIX again
- X-seq: zsh-users 30740
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh <zsh-users@xxxxxxx>
- Subject: Re: TMPDIR vs TMPPREFIX again
- Date: Fri, 14 Aug 2026 15:48:12 +0100 (BST)
- Archived-at: <https://zsh.org/users/30740>
- Feedback-id: 20260814-p.w.stephenson@xxxxxxxxxxxx:oxsmtp-prd-nl-vmo:Authrelay:p.w.stephenson@xxxxxxxxxxxx
- Importance: Normal
- In-reply-to: <CAA=-s3wJBEmUpWm9jC=gx5kbLnHBL+rUoygy+V7hNB-mRt6o2Q@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <87tsox3jbu.fsf@dancol.org> <CAHYJk3S=gwOYELc-rAr=91sKnX=k__Dx=kQu-KmdEM1v0UALLw@mail.gmail.com> <CAA=-s3wJBEmUpWm9jC=gx5kbLnHBL+rUoygy+V7hNB-mRt6o2Q@mail.gmail.com>
On 14/08/2026 15:28 BST Mark J. Reed <markjreed@xxxxxxxxx> wrote:
>
>
> How does TMPPREFIX get initialized? At least on my Mac, it's not set
> in the environment before zsh starts - but TMPDIR is, set by the OS.
> It seems like in that case zsh should initialize TMPPREFIX using
> TMPDIR instead of /tmp. If I were writing the initialization as a ?> shell command I'd probably go with this:
>
> : "${TMPPREFIX:=${TMPDIR:-/tmp}/zsh}}"
The zsh source code doesn't treat TMPDIR as special at all, so this
looks to me like something to go in an initialisation file, indeed
it looks like it would make sense in a general system initialisation
file.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author