Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a script written in bash that sets up my zsh config and changes current user's shell to zsh if needed/possible. After default shell is changed, I want zsh to load my new profile, but when I do a regular source, it opens in shell run by script (bash).

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I don't find any step in your question, where you actually start the Z shell... so probably you want to include a exec /bin/zsh in your (bash-) script and then zsh will source automatically your zsh config in ~/.zshrc.

Excerpt from bash's man page:

exec [-cl] [-a name] [command [arguments]]

If command is specified, it replaces the shell. No new process is created (...)

share|improve this answer
    
I rechecked my code and found that I did my exec wrong using ``. Thanks! –  Dmitry Gladkov Feb 28 '13 at 11:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.