Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

EricCrosson/guard-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Build Status

This package simplifies busy-wait synchronization in the terminal.

Installation

Install with npm:

npm install --global guard-cli

Usage

Provide a predicate and a payload:

guard ping -c1 google.com && espeak "Attention: the internet is back. This is not a drill"
guard test -e download.tar.gz && dtrx download.tar.gz

For the opposite of guard, i.e. a command that blocks until condition is not met, use nguard:

nguard test -e trash && echo Directory removed, deletion complete!

Credits

The original (Bash) implementation came from @hershal. Kudos