You can edit one or more tasks using the Pueue client. When you initiate an edit, the selected tasks are Locked on the daemon side, preventing them from being started or manipulated until the editing process is complete or aborted.
Editing Modes
Pueue supports two different editing modes, which can be configured in your settings:
- TOML Mode (
EditMode::Toml): Creates a single temporary tasks.toml file containing all selected tasks. This is convenient but requires you to follow TOML syntax and escaping rules to avoid deserialization errors. - Files Mode (
EditMode::Files): Creates a temporary directory containing a subfolder for each task. Each task folder contains individual files for its editable properties (command, path, label, and priority). This mode is safer as it avoids complex file format parsing.
Requirements
- The
$EDITOR environment variable must be set in your shell so Pueue knows which text editor to launch. - In Files Mode, the following files are used per task:
command: The task's original command.path: The task's working directory.label: The task's label (an empty file results in no label).priority: The task's priority (must be a valid integer).
Error Handling
If an error occurs during editing (e.g., the editor exits with a non-zero code, or you provide invalid data like an empty command or a non-existent path), the client attempts to notify the daemon to restore the tasks from their Locked state to their previous state.