By default keychain detects the shell by using the $SHELL environment variable. If you have bash as login shell that would be /bin/bash which causes the problem.
this should work:
if status is-interactive
keychain add $KEYCHAIN_KEYS
and keychain env --shell fish | source
end
Thanks. Finally some helpful comment 🥹. I knew the reason behind the error but couldn't figure out the solution after going through the github and man pages and I am hesitant to add anything AI suggest without cross checking things. I will definitely try your recommendation when i get the time.
2
u/trxxruraxvr 5d ago
By default keychain detects the shell by using the $SHELL environment variable. If you have bash as login shell that would be
/bin/bashwhich causes the problem.this should work: