Updated pm-task.
This commit is contained in:
12
pm-task
12
pm-task
@@ -270,7 +270,17 @@ main() {
|
|||||||
"")
|
"")
|
||||||
show_menu
|
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 "Unknown task: $task"
|
||||||
echo "Usage: $0 [task]"
|
echo "Usage: $0 [task]"
|
||||||
echo "Run '$0 --help' for available tasks."
|
echo "Run '$0 --help' for available tasks."
|
||||||
|
|||||||
Reference in New Issue
Block a user