radicle-heartwood-lfs/radicle-cli
Fintan Halpenny 0d402647cb
term: allow Editor to be reusable
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.
2024-11-11 11:27:33 +01:00
..
examples cob: Add an experimental "job" COB 2024-11-06 17:26:00 +01:00
src term: allow Editor to be reusable 2024-11-11 11:27:33 +01:00
tests cob: Add an experimental "job" COB 2024-11-06 17:26:00 +01:00
Cargo.toml Update `radicle-cli` crate to 0.11.0 2024-09-03 12:33:02 +02:00
build.rs Update radicle crates to 0.9.0 2024-03-26 11:56:27 +01:00