Skip to content

paul-russo/h1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

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 +:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:

About

Print full-width header text in your shell.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages