Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep scrollback buffer when clearing. #4

Closed
Hassan-Shabbir opened this issue Nov 26, 2017 · 3 comments
Closed

Keep scrollback buffer when clearing. #4

Hassan-Shabbir opened this issue Nov 26, 2017 · 3 comments
Assignees

Comments

@Hassan-Shabbir
Copy link

I prefer to have this plugin keep the scrollback buffer when clearing the screen.
To do so I added the -x flag to the clear command on line 16 of almostontop.plugin.zsh.
Now after every command the screen is cleared but I am still able to access the outputs of previous commands by scrolling up.

@Valiev
Copy link
Owner

Valiev commented Nov 27, 2017

Hello,
What does -x flag do? The reason I'm asking, I could see output of previous commands by scrolling up by default.

@Hassan-Shabbir
Copy link
Author

Interesting. For me, the clear command deletes it from the scrollback buffer so I can't scroll up to see the previously executed commands. I am using the xfce4-terminal app, so I assume that may be the reason.

From the clear man page:

OPTIONS
...
       -x   do not attempt to clear the terminal's scrollback buffer using  the
            extended “E3” capability.

So by using clear -x instead of clear it keeps the scrollback buffer for me.

@Valiev Valiev self-assigned this Nov 29, 2017
Valiev pushed a commit that referenced this issue Nov 29, 2017
In some terminal `clear` default behaviour disables scrolling thought
history. `-x` flag to prevent from it.

#4
@Valiev
Copy link
Owner

Valiev commented Nov 29, 2017

See linked changes. It covers your case.

@Valiev Valiev closed this as completed Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants