4

zsh is apparently using /tmp/zshXXXXXX to store temporary files created by the process substitution using =(). For example,

$ echo =(echo test)
/tmp/zsh4RmpQZ

However, I would like to change the location to /run to make use of my tmpfs mount.

Is there a configuration option in zsh to change the (default) location of the temporary file in the process substitution using =()?

3

The zsh shell uses the variable TMPPREFIX when creating temporary files.

According to the manual:

TMPPREFIX

A pathname prefix which the shell will use for all temporary files. Note that this should include an initial part for the file name as well as any directory names. The default is /tmp/zsh.

Testing:

% TMPPREFIX="$HOME"/hello
% echo =(echo test)
/home/kk/hellotwu65k

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.