radicle-heartwood-lfs/radicle-cli/src
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
..
commands term: allow Editor to be reusable 2024-11-11 11:27:33 +01:00
git Update `rust-toolchain` to 1.80 2024-08-06 14:37:21 +02:00
terminal term: allow Editor to be reusable 2024-11-11 11:27:33 +01:00
commands.rs cob: Add an experimental "job" COB 2024-11-06 17:26:00 +01:00
git.rs Rename `Id` to `RepoId` 2024-01-22 15:51:44 +01:00
lib.rs cli: sync on patch and issue updates 2023-12-19 14:19:55 +01:00
main.rs cob: Add an experimental "job" COB 2024-11-06 17:26:00 +01:00
node.rs radicle: refactor doc 2024-10-22 14:58:12 +01:00
pager.rs cli: Add pager to `rad diff` 2023-11-03 14:20:16 +01:00
project.rs cli: Move common functionality out of the CLI 2024-06-12 15:36:34 +02:00
terminal.rs cob: Add an experimental "job" COB 2024-11-06 17:26:00 +01:00