this code to select the processor automatically is very weird if you run another terminal(like zsh) because it relies on the 'type' command that is a function from bash, we need a better solution.