support directories in commands