aboutsummaryrefslogtreecommitdiff
path: root/man/man1/maybe.1
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-09 11:19:29 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-09 11:19:29 +1200
commitc80b70a994983f3ac56e73407f2a534993843c0f (patch)
tree8e1921d1666b65b04e23914359f47815e4813866 /man/man1/maybe.1
parentAdd issue grizzling about pandoc(1) (diff)
downloaddotfiles-c80b70a994983f3ac56e73407f2a534993843c0f.tar.gz
dotfiles-c80b70a994983f3ac56e73407f2a534993843c0f.zip
Rename myb(1) back to maybe(1)
Changed my mind again
Diffstat (limited to 'man/man1/maybe.1')
-rw-r--r--man/man1/maybe.127
1 files changed, 27 insertions, 0 deletions
diff --git a/man/man1/maybe.1 b/man/man1/maybe.1
new file mode 100644
index 00000000..3d27901b
--- /dev/null
+++ b/man/man1/maybe.1
@@ -0,0 +1,27 @@
+.TH MAYBE 1 "August 2016" "Manual page for maybe"
+.SH NAME
+.B maybe
+\- possibly exit with success
+.SH USAGE
+.B maybe
+.br
+.B maybe
+DENOMINATOR
+.br
+.B maybe
+NUMERATOR DENOMINATOR
+.SH DESCRIPTION
+Like true(1) or false(1), but exits with success randomly with a given
+probability. Good for using in tests. Exits with 2 rather than 1 on usage
+errors.
+.P
+The numerator default to 1 and the denominator to 2 for a roughly equal chance
+of success or failure. rndi(1) is used for the randomness.
+.P
+ $ maybe
+ $ maybe 3
+ $ maybe 2 5
+.SH SEE ALSO
+true(1), false(1), try(1), rndi(1)
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>