feat: add --compact flag for minimal task list output (#1054)
* feat: add --compact flag for minimal task list output --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1753,6 +1753,7 @@ function registerCommands(programInstance) {
|
||||
)
|
||||
.option('-s, --status <status>', 'Filter by status')
|
||||
.option('--with-subtasks', 'Show subtasks for each task')
|
||||
.option('-c, --compact', 'Display tasks in compact one-line format')
|
||||
.option('--tag <tag>', 'Specify tag context for task operations')
|
||||
.action(async (options) => {
|
||||
// Initialize TaskMaster
|
||||
@@ -1770,18 +1771,21 @@ function registerCommands(programInstance) {
|
||||
|
||||
const statusFilter = options.status;
|
||||
const withSubtasks = options.withSubtasks || false;
|
||||
const compact = options.compact || false;
|
||||
const tag = taskMaster.getCurrentTag();
|
||||
// Show current tag context
|
||||
displayCurrentTagIndicator(tag);
|
||||
|
||||
console.log(
|
||||
chalk.blue(`Listing tasks from: ${taskMaster.getTasksPath()}`)
|
||||
);
|
||||
if (statusFilter) {
|
||||
console.log(chalk.blue(`Filtering by status: ${statusFilter}`));
|
||||
}
|
||||
if (withSubtasks) {
|
||||
console.log(chalk.blue('Including subtasks in listing'));
|
||||
if (!compact) {
|
||||
console.log(
|
||||
chalk.blue(`Listing tasks from: ${taskMaster.getTasksPath()}`)
|
||||
);
|
||||
if (statusFilter) {
|
||||
console.log(chalk.blue(`Filtering by status: ${statusFilter}`));
|
||||
}
|
||||
if (withSubtasks) {
|
||||
console.log(chalk.blue('Including subtasks in listing'));
|
||||
}
|
||||
}
|
||||
|
||||
await listTasks(
|
||||
@@ -1789,7 +1793,7 @@ function registerCommands(programInstance) {
|
||||
statusFilter,
|
||||
taskMaster.getComplexityReportPath(),
|
||||
withSubtasks,
|
||||
'text',
|
||||
compact ? 'compact' : 'text',
|
||||
{ projectRoot: taskMaster.getProjectRoot(), tag }
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user