horizontal-rule: horizontal rule for the terminal

[ library, mit, program, utils ] [ Propose Tags ]

This package provides a utility for displaying a horizontal rule in a terminal. Please see the README on GitHub at https://github.com/ExtremaIS/hr-haskell#readme.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
write-hie

write .hie files

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.5.0.0, 0.6.0.0
Change log CHANGELOG.md
Dependencies ansi-wl-pprint (>=0.6 && <0.7), base (>=4.7 && <5), horizontal-rule, optparse-applicative (>=0.14 && <0.18), terminal-size (>=0.3 && <0.4), text (>=1.2.3 && <2.1), time (>=1.8 && <1.13) [details]
License MIT
Copyright Copyright (c) 2019-2022 Travis Cardwell
Author Travis Cardwell <travis.cardwell@extrema.is>
Maintainer Travis Cardwell <travis.cardwell@extrema.is>
Category Utils
Home page https://github.com/ExtremaIS/hr-haskell#readme
Bug tracker https://github.com/ExtremaIS/hr-haskell/issues
Source repo head: git clone https://github.com/ExtremaIS/hr-haskell.git
Uploaded by TravisCardwell at 2022-03-01T01:05:37Z
Distributions LTSHaskell:0.6.0.0, NixOS:0.6.0.0, Stackage:0.6.0.0
Executables hr
Downloads 266 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-03-01 [all 1 reports]

Readme for horizontal-rule-0.5.0.0

[back to package description]

hr

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub CI Hackage Stackage LTS Stackage Nightly

Overview

hr is a utility for displaying a horizontal rule in a terminal.

It is useful for marking a position in your terminal so that you can easily find it again. For example, use hr to display a horizontal rule before each build of a project so that you can easily find the beginning of the output of the last build.

CLI

Requirements

hr has only been tested on Linux. It might work on Windows and macOS.

Installation

.deb Package Installation

Check the Releases page for .deb packages.

.rpm Package Installation

Check the Releases page for .rpm packages.

Installation From Hackage

Install hr from Hackage using Cabal as follows:

$ cabal v2-install horizontal-rule

Installation From Stackage

Install hr from Stackage using Stack as follows:

$ stack install horizontal-rule

Usage

See the hr man page for usage information.

Examples

The rule fills with width of the terminal by default:

$ hr
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

In cases when the terminal width cannot be determined, a default width is used. This default width can be set with an option:

$ hr -d 78
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

If desired, the rule width can be specified:

$ hr -w 60
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

In cases where the terminal cannot display Unicode, ASCII may be used:

$ hr -a
------------------------------------------------------------------------------

The rule can include the current time:

$ hr -t
━━┫2021-05-27 19:26:09┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The time format can be specified:

$ hr -t -f "%H:%M:%S.%q"
━━┫19:30:44.861779179000┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The first line read from STDIN can be used as a note:

$ uname -m | hr -i
━━┫x86_64┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

When input is read, a timeout is used to ensure that hr does not "hang" when there is no input. The timeout (in milliseconds) can be specified:

$ uname -m | hr -i --timeout 100
━━┫x86_64┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

A note can be specified as one or more arguments:

$ hr unit tests
━━┫unit tests┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Different types of notes can be combined:

$ uname -m | hr -it unit tests
━━┫2021-05-27 19:48:48┣━┫unit tests┣━┫x86_64┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Library

You can easily include horizontal rules in the output of your own Haskell software by using the library. The Haskell package is named horizontal-rule in Hackage and Stackage because there is an existing package named hR.

Project

Tags

All releases are tagged in the main branch. Release tags are signed using the security@extrema.is GPG key.

Contribution

Issues and feature requests are tracked on GitHub: https://github.com/ExtremaIS/hr-haskell/issues

Issues may also be submitted via email to bugs@extrema.is.

License

This project is released under the MIT License as specified in the LICENSE file.