make Ctrl+P plugin smarter for detecting root