Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix temp dir creation when TMPDIR is set and has no trailing slash #146

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

pschmitt
Copy link
Contributor

@pschmitt pschmitt commented Nov 30, 2021

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

@pschmitt pschmitt changed the title Fix temp dir creation when ZVM_TMPDIR is unset or has no trailing slash Fix temp dir creation when TMPDIR is set and ahas no trailing slash Nov 30, 2021
@pschmitt pschmitt changed the title Fix temp dir creation when TMPDIR is set and ahas no trailing slash Fix temp dir creation when TMPDIR is set and has no trailing slash Nov 30, 2021
@jeffreytse jeffreytse self-assigned this Dec 1, 2021
@jeffreytse jeffreytse added the enhancement New feature or request label Dec 1, 2021
Copy link
Owner

@jeffreytse jeffreytse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pschmitt, thanks for the contribution to compatibility improvement. 👍

@pschmitt
Copy link
Contributor Author

pschmitt commented Dec 2, 2021

Sure thing. Anything holding you back from merging this one in?

@jeffreytse
Copy link
Owner

@pschmitt Recently I'm quite busy, sorry for the late reply. : )

@jeffreytse jeffreytse merged commit 007db23 into jeffreytse:master Dec 2, 2021
@pschmitt pschmitt deleted the tmpdir-fix branch December 2, 2021 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants