neo-tree.nvim
neo-tree.nvim copied to clipboard
Is a PR for file permissions welcome
Liking this plugin a lot.
I live in the world of bash and many of the files I make have very specific permission requirements. I was wondering if it would be a reasonable PR if I build a permission modification popup (similar to the rename).
Admittedly this leave non-WSL windows folks out, but maybe that can be incorporated too.
Sure. Would you just be prompting for a numerical code?
I don't think the command would be mapped by default, and there should be a helpful message if a windows user tries to use it.
cool, yeah, that's sort of how I envisioned it.
the "mvp" would allow the numerical code for power users (can't see somebody using neo-tree in neovim on a *nix cli, and not knowing how file perms work :))
@ludicast , I would highly recommend considering using vim.loop.fs_chmod. This (I believe) is cross platform compatible, thus not leaving windows users out, AND is provided by neovim in the standard library. However you present the chmod interface, as long as you use the above function, you should be able to safely target all platforms neovim is stable and tested against
As I usually use terminal buffer inside neovim, I would prefer doing this kind of job from the terminal buffer(or even doing it outside neovim). Why? That's because this kind of command can be dangerous(changing permission will mean those files can now be deleted by any mis-submitted command and/or logical error from any plugin implementor), so keeping the terminal command history is necessary for me. I can easily retrieve this information if this is done in terminal(-buffer). End of opinion.
So, it would be good if you could provide a way to revert what has been done in the last couple of permission-change actions. Or maybe storing a log file somewhere so the user can know how to revert when some mistyping happens.
Logs are always great, but if you don't trust something to do the thing you told it to do, then don't use the thing?
[...] but if you don't trust something to do the thing you told it to do, then don't use the thing?
@miversen33 Yes, that is exactly what I want to express ;) But since we cannot avoid accidents, what I'm trying express is that if the backup/rollback mechnism can be designed so that things can be undo/recovered, I will try it even if I know I might make a typo in the future.