id: task-67 title: Add -p shorthand for --parent option in task create command status: Done assignee: [] created_date: '2025-06-15' updated_date: '2025-06-15' labels:
- cli
- enhancement dependencies: []
Description
Add support for using -p as a shorthand alias for --parent when creating tasks. This will improve the CLI usability by allowing users to specify parent tasks more quickly.
Acceptance Criteria
- [x]
-poption works as an alias for--parentin thetask createcommand - [x] Both
backlog task create "Task title" -p task-5andbacklog task create "Task title" --parent task-5produce the same result - [x] Help text shows
-pas the shorthand for--parent - [x] Existing
--parentfunctionality remains unchanged - [x] Tests are added to verify both options work correctly
Implementation Notes
- Added
-pas a shorthand for--parentin the task create command (src/cli.ts:243) - The implementation was straightforward - simply updated the option definition to include both the shorthand and long form
- Created comprehensive test suite in
src/test/cli-parent-shorthand.test.tsthat verifies:- The
-pshorthand creates subtasks with the correct parent - Both
-pand--parentproduce identical results - The help text correctly displays the shorthand option
- The
- The test subtask (task-67.1) was successfully created using the new
-poption to verify functionality