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

Errors during periodic save when window or pane includes glob character in title #68

Open
weierophinney opened this issue Oct 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@weierophinney
Copy link

I have the following configuration in place:

resurrect.periodic_save({
    interval_seconds = 300,
    save_workspaces = true,
    save_windows = true,
})

I've noticed errors a few times when it saves a window where I'm running a command that includes a glob. As an example, I'd run vim resurrect/*.lua, and observed the following error when periodic_save triggered:

ERROR logging > lua: ...bsDscomsZsMLFlexersZsresurrectsDswezterm/plugin/init.lua:141: Encryption failed:zsh:1: no matches found: /home/matthew/.local/share/wezterm/plugins/httpssCssZssZsgithubsDscomsZsMLFlexersZsresurrectsDswezterm/state/window/vim resurrect+*.lua.json
  • Should resurrect be escaping or converting globs to prevent this? (I think it should)
  • Is there a way to work around it via, for instance, a resurrect.save_state.start or resurrect.periodic_save event handler?
@MLFlexer
Copy link
Owner

MLFlexer commented Oct 22, 2024

Thanks for the issue! You are 100% correct in that it should be escaped, and i even think it goes beyond just the glob, as the only things escaped in the file names are directory seperators. So filenames with characters like [ will also be a problem as they are treated as shell operators

I would like to solve this properly instead of just making a quick patch as I think it is a bigger issue, but given that I am currently busy at university then I don't know when I will be able to complete it.

However if this is bugging you, then you can use the branch with a temporary fix: temp_glob_fix by using git switch within the directory of the plugin 😄

@MLFlexer MLFlexer added the bug Something isn't working label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants