pueue-edit
Edit a queued task's command
TLDR
Edit a task, see pueue status to get the task ID
Edit the path from which a task is executed
Edit a command with the specified editor
SYNOPSIS
pueue edit [OPTIONS] <TASK_ID | TASK_INDEX...>
PARAMETERS
TASK_ID | TASK_INDEX...
Required. Specifies one or more tasks to be edited. Tasks can be identified by their unique integer ID or by their current numerical index within the queue (0-based). Multiple task identifiers can be provided, separated by spaces.
--path <PATH>
Allows modification of the working directory for the specified task. The edited task will execute as if it was started from this new path.
--stashed
After the editing process is complete, the task will be automatically moved into a 'stashed' state. Stashed tasks do not automatically run until explicitly started.
--group <GROUP>
Specifies the group to which the task belongs. This is particularly useful when tasks with the same index exist in different groups, ensuring the correct task is edited.
DESCRIPTION
pueue-edit is a subcommand of the Pueue task queue manager, providing a convenient way to modify the command or properties of an existing task within the Pueue queue. When invoked, it opens the specified task's command string in your default text editor (determined by the EDITOR or VISUAL environment variables). After saving and closing the editor, Pueue updates the task's command in the queue. This is particularly useful for correcting typos, adjusting arguments, or changing a task's behavior without needing to re-add it entirely or affecting its current state (if not running). It supports editing tasks by their index or unique ID.
CAVEATS
- The pueue-edit command relies on the EDITOR or VISUAL environment variables to determine which text editor to use. If neither is set, it might default to vi or fail to open an editor, leading to an error.
- Editing a currently running or paused task will only apply the changes when the task is restarted or next executed. For single-shot tasks, the change will apply on its next run if it's re-queued.
- Changes made via pueue-edit only affect the task's command and properties for future executions. It does not re-run a task that has already completed or failed.
EDITOR CONFIGURATION
For a seamless editing experience, users should ensure that their EDITOR or VISUAL environment variable is set to their preferred text editor (e.g., export EDITOR=nvim
or export EDITOR=nano
). This ensures that pueue-edit launches the desired editor when modifying task commands.
TASK IDENTIFICATION
Tasks can be identified either by their unique system-assigned ID or by their current numerical index. The index is relative to the current output of pueue status for a specific group. Using the unique ID is generally more robust, especially if the queue order changes frequently.
HISTORY
Pueue itself is a relatively modern and actively developed command-line task queue manager, designed for simplicity and ease of use in terminal environments. pueue-edit is a core component that was introduced early in Pueue's development, reflecting the common user need to modify existing tasks without needing to entirely re-create them. Its functionality has remained central to Pueue's interactive task management capabilities, evolving alongside other features to provide a robust and user-friendly experience.
SEE ALSO
pueue(1), pueue-add(1), pueue-status(1), pueue-start(1), pueue-stashed(1), pueue-log(1)