rupa / z

z - jump around
Do What The F*ck You Want To Public License
16.36k stars 1.17k forks source link

Dropping tmp files (.z.XXXXXX) #146

Open rupa opened 9 years ago

rupa commented 9 years ago

z still manages to drop tempfiles every once in a while in a pretty hard to reproduce way. It's better than it used to bem and more of a nuisance than anything, but till it's completely fixed, this issue will remain open.

phiresky commented 5 years ago

Just wanted to say that this is definitely still happening, I have around 10 - 50 of these on my machines generated around on file every week. have you thought about setting a signal trap to remove them on exit? (or yeah better putting them literally anywhere else but my home directory)

YodaEmbedding commented 5 years ago

Why not just put them in /tmp? That typically resides in memory anyways, so mv from /tmp to $HOME shouldn't be a performance issue, even on strange drive setups. Or perhaps, $HOME/.cache/z.

tempfile="$(mktemp /tmp/.z.XXXXXX)"