Closed sentriz closed 10 months ago
We currently rely on the OS to clean up /tmp files. No cleanup mechanism in this plugin yet, but if this is causing issues, we'll consider adding this feature.
Is this causing any problems for you?
would it be plausible do something like this? or does the tmpfile need to last longer than the current PID?
diff --git conf.d/__async_prompt.fish conf.d/__async_prompt.fish
index ebf970f..4d566a8 100644
--- conf.d/__async_prompt.fish
+++ conf.d/__async_prompt.fish
@@ -3,6 +3,10 @@ or exit 0
set -g __async_prompt_tmpdir (command mktemp -d)
+function __async_prompt_tmpdir_cleanup --on-process-exit $fish_pid
+ rm "$__async_prompt_tmpdir"
+end
@sentriz I added such code and it seemed to work, so I committed it. Thanks for the suggestion!
thanks!
hello, thanks for fish-async-prompt :+1:
i noticed my /tmp is full of 100s of files like tmp.XXX/PID_fish_right_prompt
i presume from code such as
should we expect to be cleaned up at some stage? or is that not implemented?
thanks :+1: