Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.1 KB

README.md

File metadata and controls

23 lines (18 loc) · 1.1 KB

h1

Takes some text and echoes it out centered on the screen, surrounded by padding characters. Useful for creating headers in script output.

Inspired by and based on hr.

Installation

Install using zplug or some other plugin manager, or just source h1.zsh directly in your .zshrc file.

Usage

h1 header_text [padding_characters]

  • The first argument can be any string that you want uppercased and centered on the screen.
  • The second argument is optional, and can be any character – or sequence of characters – that you want repeated before and after your header text as padding. Defaults to .

Examples

$ h1 "howdy partner"
–––––––––––––––––––––––––––––––––––––––––– HOWDY PARTNER ––––––––––––––––––––––––––––––––––––––––––
$ h1 "welcome" "+:"
+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+: WELCOME +:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+: