-
Notifications
You must be signed in to change notification settings - Fork 62
Home
Teddy / Xinyuan Chen edited this page Apr 17, 2022
·
11 revisions
A horizontal ruler for your terminal
Tired of not finding things in your terminal because there's a lot of logs and garbage? Tired of destroying the Enter key by creating a "void zone" in your terminal so that you can see the error that you're trying to debug?
$ curl https://raw.githubusercontent.com/LuRsT/hr/master/hr > ~/bin/hr
(Examine ~/bin/hr)
$ chmod +x ~/bin/hr
Note: You should have ~/bin
in your $PATH
for this to work.
$ git clone git@github.com:LuRsT/hr.git
$ cd hr
Open Makefile
and edit the PREFIX
variable, specifying the directory
where you'd want the software to reside. Then:
$ sudo make install
OSX users can install using Homebrew:
$ brew install hr
$ hr
################################## # Till the end of your terminal window
$
$ hr '*'
********************************** # Till the end of your terminal window
$
You can also make "beautiful" ASCII patterns
$ hr - '#' -
----------------------------------
##################################
----------------------------------
$ hr '-#-' '-' '-#-'
-#--#--#--#--#--#--#--#--#--#--#--
----------------------------------
-#--#--#--#--#--#--#--#--#--#--#--
That's it, no requirements, just pure old bash
and tput
, check the source,
it's free.
Don't like bash? Don't worry, some developers made hr
in their language of
choice, check them out:
- https://github.com/jaredsohn/hr (Javascript/node.js)
- https://github.com/tddschn/hr-tddschn (Python 2 and 3, fork of hr.py)
- https://github.com/ivantsepp/hr (Ruby)
- https://github.com/bit-shift/hr-hs (Haskell)
- https://github.com/xuxiaodong/hr (Perl)
- https://github.com/ajkerrigan/pshr (Powershell)
- https://github.com/HalosGhost/.bin/blob/master/src/hr.c (C)
- https://github.com/djmattyg007/hr (C) (takes integer argument for number of lines, rather than allowing choice of characters)
- https://github.com/lurst/hr.jl (Julia)
- https://github.com/chilicuil/shundle-plugins/blob/master/aliazator/aliases/default/general.aliases#L21 (Posix sh alias)
- https://github.com/hasit/gohr (Go)
- https://github.com/sashka/hr (Go) (Treats multi-byte symbols properly)
- https://github.com/xuchunyang/hr.sml (Standard ML)
- https://github.com/etiennebatise/hr-rs (Rust)
- https://github.com/planet36/dotfiles/blob/master/link/.config/fish/functions/hr.fish (fish shell)
-
https://grayson.sh/blogs/some-alternatives-to-hr (Article discussing ways of improving the performance of
hr
) - https://redd.it/6qvwlg (Discussion about the article above)