I run zsh on my server and I want to alias the exit command, because whenever I try to terminate my SSH session I must exit from zsh and exit from bash.
I tried alias exit='exit;exit' to no avail.
I don't want to change how I start zsh but I think it's not a very good solution. I've appended zsh to /etc/profile.
How can avoid to type exit twice to terminate my SSH session?
bashis your login shell and you run zsh by manually starting it? Have you considered makingzshyour login shell or running it using theexecbuilt-in, replacing thebashprocess? – Daniel Beck♦ Nov 30 '11 at 22:46