about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-05-19 19:28:10 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-05-19 19:28:24 +0200
commit328f70c47e5dcf4eea650ffcc967310353b38d24 (patch)
treeca3d6d86c7ca8c4edf3371456f9d5f051ed835c5
parent497822a324dc7355adc1c235ce6054752ff2b692 (diff)
downloadrwc-328f70c47e5dcf4eea650ffcc967310353b38d24.tar.gz
rwc-328f70c47e5dcf4eea650ffcc967310353b38d24.tar.xz
rwc-328f70c47e5dcf4eea650ffcc967310353b38d24.zip
rwc.1: add examples
-rw-r--r--README9
-rw-r--r--rwc.110
2 files changed, 19 insertions, 0 deletions
diff --git a/README b/README
index c537bc8..b93d8f8 100644
--- a/README
+++ b/README
@@ -25,6 +25,15 @@ DESCRIPTION
 EXIT STATUS
      The rwc utility exits 0 on success, and >0 if an error occurs.
 
+EXAMPLES
+     Watch all source files and run make(1) when something changes:
+
+           % git ls-files | rwc | xe -v -s make
+
+     Make a sound when a download is done:
+
+           % rwc ~/Downloads | xe -s 'mpv ~/.sounds/bing.wav'
+
 SEE ALSO
      entr(1), inotifywatch(1), wendy(1)
 
diff --git a/rwc.1 b/rwc.1
index b34a43a..b300e98 100644
--- a/rwc.1
+++ b/rwc.1
@@ -37,6 +37,16 @@ In this case, deleted files are prefixed by
 .El
 .Sh EXIT STATUS
 .Ex -std
+.Sh EXAMPLES
+Watch all source files and run
+.Xr make 1
+when something changes:
+.Pp
+.Dl % git ls-files | rwc | xe -v -s make
+.Pp
+Make a sound when a download is done:
+.Pp
+.Dl % rwc ~/Downloads | xe -s 'mpv ~/.sounds/bing.wav'
 .Sh SEE ALSO
 .Xr entr 1 ,
 .Xr inotifywatch 1 ,