From 6025b2d8322caea124582fb9292780382466d660 Mon Sep 17 00:00:00 2001 From: Squibid Date: Tue, 18 Feb 2025 14:29:09 -0600 Subject: Add -e flag to explain what the previous smiley face means. This requires us to also know what the previous return signal is, so if XD is given a return code, it passes it through when finishing execution. --- XD.1 | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'XD.1') diff --git a/XD.1 b/XD.1 index 59038fa..5e25dd3 100644 --- a/XD.1 +++ b/XD.1 @@ -1,4 +1,4 @@ -.Dd December 19, 2024 +.Dd Febuary 18, 2025 .Dt XD 1 .Sh NAME .Nm XD @@ -6,7 +6,9 @@ .Os .Sh SYNOPSIS .Nm -.Op Fl v|number +.Op Fl v +.Op Fl e +.Op number .Sh DESCRIPTION .Nm Displays information using a smiley face like so: :) @@ -40,3 +42,37 @@ c;l. /;command not found (;previous signal is failure .TE +.Sh OPTIONS +.Ss -v +Print version information to stdout and exit. +.Ss -e +Explain the output instead of putting a smiley face. + +.Sh EXAMPLES +Running +.Nm +and passing in the previous return code ($?) results in a smiley face, if you +then follow that by \fBXD -e $?\fR then you will get an explination of what the +face is explaining. + +$ \fBXD $?\fR +.br +:) +.br +$ \fBXD -e $?\fR +.br +Not in a git repository. +.br +Return code of 0, no errors. + +$ \fBXD $?\fR +.br +;*O +.br +$ \fBXD -e $?\fR +.br +In a git repository. +.br +The're staged changes. +.br +Return code of 130, ctrl-c was pressed, or SIGTERM sent. -- cgit v1.2.1