add pathsearch to commonlib and auto tab completion