Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
term: allow Editor to be reusable
Merged fintohaps opened 1 year ago

The Editor is very useful for correctly opening a text editor and making changes to some initial input. The current use of Editor is only for getting input for commets.

However, it would also be useful for opening up a text editor on some other existing files or text, for example, in the command rad config edit.

The Editor struct was changed to have two new options, truncate and cleanup, to allow the user of the struct to dictate whether existing text is truncated, and if the underlying file should be remove.

The original new method is now named comment, mimicing the existing construction of a temporary RAD_COMMENT file.

The new version of new accepts any file for the Editor and will open it without truncating or removing the file.

Editor is now used for the rad config edit command.

fintohaps opened with revision 1eebaa32 on base f6aa46a2 +71 -36 1 year ago

The Editor is very useful for correctly opening a text editor and making changes to some initial input. The current use of Editor is only for getting input for commets.

However, it would also be useful for opening up a text editor on some other existing files or text, for example, in the command rad config edit.

The Editor struct was changed to have two new options, truncate and cleanup, to allow the user of the struct to dictate whether existing text is truncated, and if the underlying file should be remove.

The original new method is now named comment, mimicing the existing construction of a temporary RAD_COMMENT file.

The new version of new accepts any file for the Editor and will open it without truncating or removing the file.

Editor is now used for the rad config edit command.

fintohaps pushed revision 2 088d2321 on base f6aa46a2 +78 -35 1 year ago

Changes:

  • Mistakenly removed Drop impl, reintroduce and use self.cleanup
did:key:z6MksFqX...wzpT pushed revision 3 47b34bf3 on base 23f8cf0d +78 -35 1 year ago

Rebase.

did:key:z6MksFqX...wzpT merged revision 47b34bf3 at 0d402647 1 year ago