radicle-heartwood-lfs/radicle-tools/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
..
rad-agent.rs cli: Make key encryption optional 2023-07-20 10:40:15 +02:00
rad-cli-demo.rs term: allow Editor to be reusable 2024-11-11 11:27:33 +01:00
rad-init.rs Validate project names properly in all places 2024-07-31 16:05:31 +02:00
rad-merge.rs tools: Add optional revision to `rad-merge` 2024-08-20 16:23:32 +02:00
rad-push.rs cli: Tell the user when canonical head is updated 2024-01-05 12:09:30 +01:00
rad-self.rs radicle: Move some functions to `Home` type 2023-11-03 17:08:18 +01:00
rad-set-canonical-refs.rs cli: Tell the user when canonical head is updated 2024-01-05 12:09:30 +01:00