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.

When sshing to a host, the screen is cleared at exit, which makes it impossible to review recent output. This behavior seems to be set system-wide in /etc/zlogout. How can zsh be configured to not clear the screen at logout?

Related question: How to prevent clearing of terminal output when I "exit" an SSH session?

share|improve this question

1 Answer 1

The system-wide /etc/zlogout file can be overridden by adding the following to .zlogout:

setopt norcs

The norcs option signifies that zsh should not read any subsequent rc files, which includes /etc/zlogout. And since /etc/zlogout is the last processed rc file, the norcs option does not have any side effect when specified in .zlogout.

share|improve this answer

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.