Skip to content

Comment on hr for your terminalparent

Comments

Some terminals support ACS (with SCLD) but not unicode. It might be better to use ACS:

    $ hr() { printf '\e(0'; printf 'q%.0s' $(seq $(tput cols)); printf '\e(B'; }
Same thing, but potentially more portable.

edit: Could also use tput instead of $COLUMNS. Sometimes the $COLUMNS may not always be updated (bash's checkwinsize option).

For portability you should also use \033 (the octal code) instead of \e, which is non-standard.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.