lurst / hr Goto Github PK
View Code? Open in Web Editor NEWA horizontal :straight_ruler: for your terminal
License: MIT License
A horizontal :straight_ruler: for your terminal
License: MIT License
Hey @LuRsT
nice project!
So nice, that here is a man page for it (below).
Instructions for testing:
.\"-
.\" The MIT License (MIT)
.\"
.\" Copyright (c) 2014 Gil Gonçalves
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a copy of
.\" this software and associated documentation files (the "Software"), to deal in
.\" the Software without restriction, including without limitation the rights to
.\" use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
.\" the Software, and to permit persons to whom the Software is furnished to do so,
.\" subject to the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included in all
.\" copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
.\" FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
.\" COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
.\" IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
.\" hr.1
.\"
.Dd February 18, 2014
.Dt HR 1
.Os
.Sh NAME
.Nm hr
.Nd insert horizontal rule
.Sh SYNOPSIS
.Nm
.Op |*~#
.Sh DESCRIPTION
The
.Nm
utility prints a horizontal rule for the width of the terminal.
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
The command:
.Pp
.Dl "hr"
.Pp
will print
.Pa #
across the width of the terminal
.Pp
The command:
.Pp
.Dl "hr - '#' -"
.Pp
will print
.Dl ----------------------------------
.Dl ##################################
.Dl ----------------------------------
.Pp
The command:
.Pp
.Dl "hr '-#-' '-' '-#-'"
.Pp
.Dl -#--#--#--#--#--#--#--#--#--#--#--
.Dl ----------------------------------
.Dl -#--#--#--#--#--#--#--#--#--#--#--
.Sh SEE ALSO
.Xr echo 1 ,
.Xr jot 1 ,
.Xr vis 1 ,
.Xr seq 1
.Rs
Please add a License for your code, I'd like to package it for nixos.
From my terminal:
$ brew install hr
Error: No available formula for hr
$ # in case it's relevant...
$ brew tap
homebrew/dupes
nwoolls/xgminer
phinze/cask
Hello, I think the option to customize the default text (when running hr
without argument) via environment variable will be a nice feature:
export HR_DEFAULT_TEXT="<text>"
I suggest using HR_DEFAULT_TEXT
instead of HR_DEFAULT_WORD
like from the code:
hrs() { local WORD for WORD in "${@:-#}" do hr "$WORD" done }
because if (by some reason) we type:
hr 'The quick brown fox jumps over the lazy dog'
then it is definitely not a word :(
BTW, thank you for inspiring me to create (SuperB HR), a portable posix shell hr
.
Hi, this is an awesome script! Well done! I am currently developing Jean - Package Manager and I want to add this script to packages list of Jean. Can I? Thanks!
https://github.com/ziyaddin/jean
It would make the ruler more visible if I could define a ruler's colour.
Have you heard of http://unlicense.org/ ?
Great tool! 👍
Can you cut a release so I can have this added to Homebrew? Homebrew/legacy-homebrew#26628
Hi,
outputting a line of asterikses like suggested in the README does not work for me, but the following:
> ls -l
insgesamt 4
-rw-r--r-- 1 svh svh 0 24. Feb 11:21 aaa
-rw-r--r-- 1 svh svh 0 24. Feb 11:21 bbb
-rw-r--r-- 1 svh svh 0 24. Feb 11:21 ccc
drwxr-xr-x 2 svh svh 4096 24. Feb 11:21 ddd
> hr '*'
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
which is clearly not intended.
What am I doing wrong?
Thanks,
Sven
Hey @LuRsT
can you please consider making a new "release"?
The reason I ask is because the way OS X's homebrew expects new formulas to be a release, in order to make it into the official repo. If isn't a release, then it goes into a separate repo. And seeing how hr is already in homebrew, it would be good to update it.
Just to make things easier, here are the official GitHub instructions for creating a new release:
https://help.github.com/articles/creating-releases
Maybe bumping it to version 1.1 ?
As soon as you do that, I'll create a pull request for homebrew with the new version bump.
Thanks
Examples:
hr 5
hr $ 3
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ...
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ...
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ...
Hey there. I thought you might be interested in seeing my port of hr to C. It works slightly differently in that the argument it takes is a number, not a series of characters, and it prints that many lines, so that you don't have to manually write out a loop in bash to do it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.