-
-
Notifications
You must be signed in to change notification settings - Fork 640
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(plugin): Set preopen directories properly #723
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another promising feature! I think we'll need to do a little more thinking about this though (it totally breaks strider
for example, which relies on being able to access the current directory tree).
Additionally, while I think that having a private data directory for each plugin is good, I'm not really sure if we'd need / want a /global
directory. It feels like that would primarily be for communicating between different plugins, but I think that's something that I think would be better implemented in another way.
I'd be happy with changing the plugin_own_data_dir
to .join(path)
so that all of your timer plugin instances can still share data like you need them to!
To summarize, how would you feel about:
- Changing
.
to/host
and mounting the current directory there (this will also require Strider to be updated, but is better than just changing.
back to the current directory, since that would conflict with/global
in some cases) - Changing
/global
to/data
and naming that directory after the path of the loaded plugin somehow instead of theplugin_id
(this way you can still share files between several instances of the same plugin)
Very appreciate your good suggestions.
I'm fine with this.
Per my understanding, here |
I'd actually be fine with either that or the full paths, you decide what you think works best! We can improve it to take into account versions and things in the future if we need :) But yeah, plugin_name overall so plugins of the same type can share the folder like you need :) |
5e47644
to
1cd36c6
Compare
I use the plugin name because of consistency. |
Hold on please, there's an issue when unloading the plugin. |
@tw4452852 Good catch! Let me know once things are working! |
Every plugin will have following two directories for its use: `./`: Plugin's own data should be saved here, every plugin will have its own directory. `/global/`: All plugins have access to this directory, Some shared data could be saved here. Signed-off-by: Tw <tw19881113@gmail.com>
1cd36c6
to
dd9b437
Compare
@TheLostLambda I'm done, but I leave a TODO for cleanup when unloading. |
Ah! To be honest, I was kinda thinking that the folders could just stick around. That way plugins can actually store information between Zellij sessions! |
Ah, yes. |
@tw4452852 If you happy with that, I can merge this and then make the Strider fixes? Do you reckon this is ready to merge? |
Yes, it's ready. Feel free to merge. Thanks. |
Every plugin will have following two directories for its use:
./
: Plugin's own data should be saved here, every plugin will have its own directory./global/
: All plugins have access to this directory, Some shared data could be saved here.Signed-off-by: Tw tw19881113@gmail.com