mathiasbynens / dotfiles

:wrench: .files, including ~/.macos — sensible hacker defaults for macOS
https://mths.be/dotfiles
MIT License
30k stars 8.74k forks source link

The Install command fails for zsh #905

Open ahemed-haneen opened 4 years ago

ahemed-haneen commented 4 years ago

Is there a installation script for zsh as from catalina onwards zsh is being used instead of bash...right?

dnnsmnstrr commented 4 years ago

I replaced source ~/.bash_profile; with:

if [ -n "$ZSH_VERSION" ]; then
   source ~/.zshrc;
elif [ -n "$BASH_VERSION" ]; then
   source ~/.bash_profile;
else
   echo 'unknown shell'
fi

This allows me to bootstrap from both shells.

ahemed-haneen commented 2 weeks ago

I replaced source ~/.bash_profile; with:

if [ -n "$ZSH_VERSION" ]; then
   source ~/.zshrc;
elif [ -n "$BASH_VERSION" ]; then
   source ~/.bash_profile;
else
   echo 'unknown shell'
fi

This allows me to bootstrap from both shells.

Thanks for the suggestion. Though your fork looks scary (very elaborate) , I followed your suggestions and now have a customised version of the same for my use cases.