Skip to content

Let sudoedit detect every write to the temporary file. #1233

@squell

Description

@squell

At the moment sudoedit hasn't even been released yet, but trying out the development version I already have a feature request :)

Describe the feature you'd like see implemented in sudo-rs

Intermittent file updates for sudoedit, that is, every time a file is saved, update the 'parent' file. Not just when the editor closes. This would require some changes (perhaps even a few painful ones), but it should be possible with our architecture, e.g. allowing multiple writes to the parent file in the privileged process, and listening to write events in the unprivileged child process.

I think this would be a pretty nice feature enhancement.

What problem can be solved with this feature?
If I'm editing a file with sudoedit, I might want to occassionally hit 'save' and have the updated file on my system without needing to fully close down the editing session.

Additional context
There is one caveat: intermittent saves might happen automatically by some editors, and if users are used to sudoedit only making changes upon "succesful exit" of the editor, that might cause some grief. So we would need to think about this before implementing it. As it might even be a bad idea.

Of course editors that make automatic intermittent saves might already have this same behaviour with existing ogsudoedit, and then this is less of a worry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions