diff --git a/pm-task b/pm-task index 41c8345..66c2210 100755 --- a/pm-task +++ b/pm-task @@ -270,7 +270,17 @@ main() { "") show_menu ;; - *) + *) + # Try to find a matching subdirectory in workspace + if [ -d "$WORKSPACE" ]; then + matching_dir=$(find "$WORKSPACE" -mindepth 1 -maxdepth 1 -type d ! -name '.*' -path "$WORKSPACE/$task*" 2>/dev/null | head -1) + if [ -n "$matching_dir" ]; then + echo "Navigating to: $matching_dir" + cd "$matching_dir" || return 1 + ls -lah + return 0 + fi + fi echo "Unknown task: $task" echo "Usage: $0 [task]" echo "Run '$0 --help' for available tasks."