Skip to content

riesenia/homebrew-rprint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

rprint

Colored print utility for bash scripts. Simple, lightweight, and easy to use.

Installation

brew tap riesenia/utils
brew install rprint

Usage

rprint <type> <message>

Available types:

  • info - Blue info message
  • success - Green success message
  • error - Red error message (outputs to stderr)
  • warning - Yellow warning message
  • debug - Cyan debug message (only shown if DEBUG=1)

Examples

rprint info "Starting process..."
rprint success "Process completed!"
rprint error "Something went wrong"
rprint warning "This is a warning"
DEBUG=1 rprint debug "Debug information"

Use in scripts

#!/bin/bash

rprint info "Downloading files..."
curl -O https://example.com/file.tar.gz

if [ $? -eq 0 ]; then
    rprint success "Download completed"
else
    rprint error "Download failed"
    exit 1
fi

rprint warning "Don't forget to verify the file"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages