use `cmd` instead of `type`