summaryrefslogtreecommitdiffstats
path: root/XD.1
blob: 65361c00ed5a0abb55b35fcad08ff9e5159ea3f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
.Dd Febuary 18, 2025
.Dt XD 1
.Sh NAME
.Nm XD
.Nd smiley face to explain info on the shell
.Os
.Sh SYNOPSIS
.Nm
.Op Fl v
.Op Fl e
.Op number
.Sh DESCRIPTION
.Nm
Displays information using a smiley face like so: :)
to interpret it refer to the following tables:
Displays information using a smiley face.
to interpret XD's output refer to the following tables (or
.Nm
\fB-e\fR):
.Ss Eyes
.TS
tab(;) allbox;
c;l.
 :;default
 \;;in a git repo
 8;in a git repo with stashed changes
 B;in a git repo with no commits
.TE
.Ss Nose
.TS
tab(;) allbox;
c;l.
 ;default
 *;current git repo has staged changes
 ^;current git repo has untracked changes
 -;git repo's HEAD is detached
.TE
.Ss Mouth
.TS
tab(;) allbox;
c;l.
 |;no signal provided
 );previous signal is 0
 O;SIGINT sent (Ctrl-c)
 P;permission denied
 /;command not found
 (;previous signal is failure
.TE
.Ss Exit Status:
.Nm
returns the number that was passed in to allow the user to re-run the program
and get the same results. If there's an internal error
.Nm
returns 1. If you wish to find out more infomation about the error enable ERR
in the config.mk.
.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.