That command not found: compdef
line near the top may be the cause of the issue here. A possible hypothesis is that your .zprofile
does contain the appropriate entry to add daml
to PATH
, but does not reach that line because of an earlier failure.
The easiest way to move forward here would be for you to post your entire ~/.zprofile
. However, this may be a bad idea. In some situations, passwords and other credentials need to be defined as environment variables, and sometimes they can end up into your ~/.zprofile
.
Could you look through your ~/.zprofile
very carefully to verify that it does not contain any credentials or passwords, and, assuming it doesn’t, post the entire thing here?
If you don’t know how to access your ~/.zprofile
outside of the terminal, you can show the entire file in a terminal by running
$ cat ~/.zprofile
If you’re not comfortable posting you ~/.zprofile
, I’d suggest following these steps. First, try running echo $SHELL
in your terminal, to make sure you are indeed running zsh
. Then, open your ~/.zprofile
and add echo Hello!
at the top. Open a new terminal and check that you see Hello!
at the top, before the first prompt. Then, add echo Bye!
at the end of the file. Open a new terminal and verify that you can see both Hello!
and Bye!
before your prompt.
If you see both, it means the entire file runs to completion, and the issue must be more involved. If you don’t see the Bye!
message, try moving the echo Bye!
command up in the ~/.zprofile
one line at a time, until it appears (saving the file and opening a new terminal each time). When it appears, you know the line you just crossed is the one causing an issue.
If both messages appear right away, then I’d try adding our first command, echo "${PATH}" | tr ':' '\n' | grep daml
, at the end of your ~/.zprofile
, right before the echo Bye!
. If you see nothing in-between Hello!
and Bye!
, then I’m out of ideas without seeing your ~/.zprofile
. If you see the expected /Users/stevenscarpati/.daml/bin
in-between the two, it means that ~/.zprofile
sets your PATH
as expected, but something else resets it afterwards.
If you never see the Hello!
message, it means your zsh
is somehow not sourcing ~/.zprofile
at all and we should set the PATH
elsewhere.
In all cases, the output of which zsh
and zsh --version
could be useful too in debugging this.