TMPDIR when set usually does not include a trailing slash.
This here fixes the tmpdir creation when editing the current cmdline, which leads to the following when TMPDIR doesn't end with /:
> my-very-long-command
# bindkey for editing the command line
mktemp: failed to create file via template ‘/tmpzshXXXXXX’: Permission denied
zvm_vi_edit_command_line:7: no such file or directory:
Having a static / in the tmpdir filename works in both cases since /tmp//zvm is the same as /tmp/zvm
TMPDIR
when set usually does not include a trailing slash.This here fixes the tmpdir creation when editing the current cmdline, which leads to the following when
TMPDIR
doesn't end with/
:Having a static
/
in the tmpdir filename works in both cases since/tmp//zvm
is the same as/tmp/zvm