Use which instead of type to pick open command