Reputation: 1
How can I make sure .sh files are executed with the zshell interpreter from the Mac terminal without specifying the zsh prefix every time? The shell default is set to zshell already but a command to run a .sh file won't execute unless I prefix with zsh...
Upvotes: 0
Views: 934
Reputation: 801
To change the shell to zsh: chsh -s $(which zsh)
(zsh is probably the default shell already).
To run a .sh script without having to use zsh
command:
#!/usr/bin/env zsh
.chmod +x <filename>
./<filename>
Upvotes: 1