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

Implement Clear #70

Merged
merged 2 commits into from Oct 4, 2019
Merged

Implement Clear #70

merged 2 commits into from Oct 4, 2019

Conversation

zshzero
Copy link
Contributor

@zshzero zshzero commented Oct 3, 2019

Address issue #69

It is just a one-line simple code

@GrayJack
Copy link
Owner

GrayJack commented Oct 3, 2019

Can you implement these features too? That would be awesome!!

-T TERM     use this instead of $TERM
-x          do not try to clear scrollback

I use them quite a lot, and know some people that uses it as whell

Also, use the git message formatting for future commits

@zshzero
Copy link
Contributor Author

zshzero commented Oct 3, 2019

ok... correct me if i am wrong...
-> -x option does clear the screen and lands to the line next to the prompt
-> -T $TERM option clears the whole terminal (Can we just make it -T ?)

@GrayJack
Copy link
Owner

GrayJack commented Oct 3, 2019

Yes, -x does that, but it allows the person to scroll back
My output when I do clear -x

clear -x | hexdump -C
00000000  1b 5b 48 1b 5b 32 4a                              |.[H.[2J|
00000007

The -T option let you choose a TERM to clear, while absent the utility clears $TERM, that means, the current one

@zshzero
Copy link
Contributor Author

zshzero commented Oct 4, 2019

ok... And my output was

$ clear -x | hexdump -C
00000000  1b 5b 48 1b 5b 32 4a                              |.[H.[2J|
00000007
$ clear | hexdump -C
00000000  1b 5b 33 4a 1b 5b 48 1b  5b 32 4a                 |.[3J.[H.[2J|
0000000b
$ clear -T $TERM | hexdump -C
00000000  1b 5b 33 4a 1b 5b 48 1b  5b 32 4a                 |.[3J.[H.[2J|
0000000b

Am i good to go ?

@GrayJack
Copy link
Owner

GrayJack commented Oct 4, 2019

In that case just implement the -x, -T could be a feature for the future

@GrayJack
Copy link
Owner

GrayJack commented Oct 4, 2019

Thanks for the contribution, gonna merge asap

@GrayJack GrayJack merged commit 5a1d308 into GrayJack:master Oct 4, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants