Should I start my ZSH scripts with #!/usr/bin/env zsh
, or #!/bin/zsh
, or what? This seems like a very Google-able problem, but I haven't been able to find any information of what's the best option.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityShould I start my ZSH scripts with #!/usr/bin/env zsh
, or #!/bin/zsh
, or what? This seems like a very Google-able problem, but I haven't been able to find any information of what's the best option.
env
, because not all systems are going to put the shell you want to use in /bin. Also consider whether you are, or should be, writing scripts that depend onzsh
.